Controlling power state demotion in a processor

ABSTRACT

In an embodiment, a processor for demotion includes a plurality of cores to execute instructions and a demotion control circuit. The demotion control circuit is to: for each core of the plurality of cores, determine an average count of power state break events in the core; determine a sum of the average counts of the plurality of cores; determine whether the average count of a first core exceeds a first demotion threshold; determine whether the sum of the average counts of the plurality of cores exceeds a second demotion threshold; and in response to a determination that the average count of the first core exceeds the first demotion threshold and the sum of the average counts exceeds the second demotion threshold, perform a power state demotion of the first core. Other embodiments are described and claimed.

FIELD OF INVENTION

Embodiments relate generally to computer processors. More particularly,embodiments are related to power management in computer processors.

BACKGROUND

Advances in semiconductor processing and logic design have permitted anincrease in the amount of logic that may be present on integratedcircuit devices. As a result, computer system configurations haveevolved from a single or multiple integrated circuits in a system tomultiple hardware threads, multiple cores, multiple devices, and/orcomplete systems on individual integrated circuits. Further, as thedensity of integrated circuits has grown, the power requirements forcomputing systems have also grown. As a result, there is a vital needfor energy efficiency and conservation associated with integratedcircuits.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of a portion of a system in accordance with anembodiment of the present invention.

FIG. 2 is a block diagram of a processor in accordance with anembodiment of the present invention.

FIG. 3 is a block diagram of a multi-domain processor in accordance withanother embodiment of the present invention.

FIG. 4 is an embodiment of a processor including multiple cores.

FIG. 5 is a block diagram of a micro-architecture of a processor core inaccordance with one embodiment of the present invention.

FIG. 6 is a block diagram of a micro-architecture of a processor core inaccordance with another embodiment.

FIG. 7 is a block diagram of a micro-architecture of a processor core inaccordance with yet another embodiment.

FIG. 8 is a block diagram of a micro-architecture of a processor core inaccordance with a still further embodiment.

FIG. 9 is a block diagram of a processor in accordance with anotherembodiment of the present invention.

FIG. 10 is a block diagram of a representative SoC in accordance with anembodiment of the present invention.

FIG. 11 is a block diagram of another example SoC in accordance with anembodiment of the present invention.

FIG. 12 is a block diagram of an example system with which embodimentscan be used.

FIG. 13 is a block diagram of another example system with whichembodiments may be used.

FIG. 14 is a block diagram of a representative computer system.

FIGS. 15A-15B are block diagrams of systems in accordance withembodiments of the present invention.

FIG. 16 is a block diagram illustrating an IP core development systemused to manufacture an integrated circuit to perform operationsaccording to an embodiment.

FIGS. 17A-17B are block diagrams illustrating a generic vector friendlyinstruction format and instruction templates thereof according toembodiments of the invention.

FIGS. 18A-D are block diagrams illustrating an exemplary specific vectorfriendly instruction format according to embodiments of the invention.

FIG. 19 is a block diagram of a register architecture according to oneembodiment of the invention.

FIG. 20A is a block diagram illustrating both an exemplary in-orderpipeline and an exemplary register renaming, out-of-orderissue/execution pipeline according to embodiments of the invention.

FIG. 20B is a block diagram illustrating both an exemplary embodiment ofan in-order architecture core and an exemplary register renaming,out-of-order issue/execution architecture core to be included in aprocessor according to embodiments of the invention.

FIGS. 21A-B illustrate a block diagram of a more specific exemplaryin-order core architecture, which core would be one of several logicblocks (including other cores of the same type and/or different types)in a chip.

FIG. 22 is a block diagram of a processor that may have more than onecore, may have an integrated memory controller, and may have integratedgraphics according to embodiments of the invention.

FIGS. 23-24 are block diagrams of exemplary computer architectures.

FIG. 25 is a block diagram contrasting the use of a software instructionconverter to convert binary instructions in a source instruction set tobinary instructions in a target instruction set according to embodimentsof the invention.

FIG. 26 is a diagram of an example system in accordance with one or moreembodiments.

FIG. 27 is an illustration of an example operation in accordance withone or more embodiments.

FIG. 28 is an illustration of an example storage in accordance with oneor more embodiments.

FIG. 29 is a flow diagram of an example method for demotion, inaccordance with one or more embodiments.

FIG. 30 is a flow diagram of an example method for un-demotion, inaccordance with one or more embodiments.

FIG. 31 is a flow diagram of an example method for demotion, inaccordance with one or more embodiments.

FIG. 32 is a flow diagram of an example method for demotion, inaccordance with one or more embodiments.

DETAILED DESCRIPTION

Some computer processors may include multiple processing engines, whichmay be referred to as “cores.” Further, some processor and/or cores canuse various operating states to reduce power consumption. For example, aprocessor may enter one of multiple power states, with deeper low powerstates using less electrical power that shallower low power states.However, using a deep low power state may introduce performancedegradation due to entry and exit latency, loss of core architecturalinformation like its cache, translation lookaside buffer (TLB), branchtarget buffer (BTB), etc. Further, deep low power state transitions mayconsume energy to save and restore state. With the overall desire forenergy savings, running longer at a given power due to performancedegradation increases energy consumption. This effect, together with thesave/restore energy cost, may cost more energy than the energy saved bythe low power state. Thus, greater numbers of low power statetransitions (e.g., idle state or “C state” transitions) may cause higherenergy costs and higher performance impact. Therefore, in somesituations, entering a deeper power state may result in lost energy.Accordingly, a processor may be configured with logic to perform powerstate demotion (also referred to as “auto-demotion”). As used herein,“demotion” refers a process in which a request for a deeper power state(e.g., C6) is overruled or demoted to a shallower power state (e.g.,C1). For example, if the operating system (OS) requests a C3 state in acore that is operating in a demoted mode, the power controller mayinstead demote the power state of the core to C1.

In one or more embodiments, a processor may include demotion logic toperform single-core demotion (SCD) and multi-core demotion (MCD). Asused herein, “single-core demotion” refers to demoting a core based on acore-level metric for the same core. For example, single-core demotionmay include demoting a core based on the average number of break events(i.e., changes between power states) in that core. Further, as usedherein, “multi-core demotion” refers to demoting one or more cores basedat least in part on a processor-level metric. For example, multi-coredemotion may include demoting a core based at least in part on the sumof average numbers of break events across multiple cores in theprocessor. In some embodiments, use of multi-core demotion may provideimproved reaction to power states across multiple cores. For example,multi-core demotion may improve processing of threads that are migratedbetween cores. In another example, multi-core demotion may improveprocessing of producer/consumer work that is divided across multiplecores.

In one or more embodiments, the demotion logic may perform single-coreun-demotion (SCUD) and multi-core un-demotion (MCUD). As used herein,“single-core un-demotion” refers to causing a core to exit a single-coredemotion mode. Further, as used herein, “multi-core un-demotion” refersto causing a core to exit a multi-core demotion mode. For example, aftereither a single-core un-demotion or a multi-core un-demotion, a corewill respond to a request for a deeper power state by entering therequested power state.

In some embodiments, using single-core demotion and multi-core demotionmay allow selection of power states based on core conditions andprocessor conditions. Accordingly, some embodiments may provide improvedflexibility and/or granularity in controlling power states, and may thusprovide reduced power consumption. Various details of some embodimentsare described further below with reference to FIGS. 26-32. Further,exemplary systems and architectures are described below with referenceto FIGS. 1-25.

Exemplary Systems and Architectures

Although the following embodiments are described with reference toparticular implementations, embodiments are not limited in this regard.In particular, it is contemplated that similar techniques and teachingsof embodiments described herein may be applied to other types ofcircuits, semiconductor devices, processors, systems, etc. For example,the disclosed embodiments may be implemented in any type of computersystem, including server computers (e.g., tower, rack, blade,micro-server and so forth), communications systems, storage systems,desktop computers of any configuration, laptop, notebook, and tabletcomputers (including 2:1 tablets, phablets and so forth).

In addition, disclosed embodiments can also be used in other devices,such as handheld devices, systems on chip (SoCs), and embeddedapplications. Some examples of handheld devices include cellular phonessuch as smartphones, Internet protocol devices, digital cameras,personal digital assistants (PDAs), and handheld PCs. Embeddedapplications may typically include a microcontroller, a digital signalprocessor (DSP), network computers (NetPC), set-top boxes, network hubs,wide area network (WAN) switches, wearable devices, or any other systemthat can perform the functions and operations taught below. Further,embodiments may be implemented in mobile terminals having standard voicefunctionality such as mobile phones, smartphones and phablets, and/or innon-mobile terminals without a standard wireless voice functioncommunication capability, such as many wearables, tablets, notebooks,desktops, micro-servers, servers and so forth.

Referring now to FIG. 1, shown is a block diagram of a portion of asystem in accordance with an embodiment of the present invention. Asshown in FIG. 1, system 100 may include various components, including aprocessor 110 which as shown is a multicore processor. Processor 110 maybe coupled to a power supply 150 via an external voltage regulator 160,which may perform a first voltage conversion to provide a primaryregulated voltage Vreg to processor 110.

As seen, processor 110 may be a single die processor including multiplecores 120 a-120 n. In addition, each core may be associated with anintegrated voltage regulator (IVR) 125 a-125 n which receives theprimary regulated voltage and generates an operating voltage to beprovided to one or more agents of the processor associated with the IVR.Accordingly, an IVR implementation may be provided to allow forfine-grained control of voltage and thus power and performance of eachindividual core. As such, each core can operate at an independentvoltage and frequency, enabling great flexibility and affording wideopportunities for balancing power consumption with performance. In someembodiments, the use of multiple IVRs enables the grouping of componentsinto separate power planes, such that power is regulated and supplied bythe IVR to only those components in the group. During power management,a given power plane of one IVR may be powered down or off when theprocessor is placed into a certain low power state, while another powerplane of another IVR remains active, or fully powered. Similarly, cores120 may include or be associated with independent clock generationcircuitry such as one or more phase lock loops (PLLs) to controloperating frequency of each core 120 independently.

Still referring to FIG. 1, additional components may be present withinthe processor including an input/output interface (IF) 132, anotherinterface 134, and an integrated memory controller (IMC) 136. As seen,each of these components may be powered by another integrated voltageregulator 125 _(x). In one embodiment, interface 132 may enableoperation for an Intel® Quick Path Interconnect (QPI) interconnect,which provides for point-to-point (PtP) links in a cache coherentprotocol that includes multiple layers including a physical layer, alink layer and a protocol layer. In turn, interface 134 may communicatevia a Peripheral Component Interconnect Express (PCIe™) protocol.

Also shown is a power control unit (PCU) 138, which may includecircuitry including hardware, software and/or firmware to perform powermanagement operations with regard to processor 110. As seen, PCU 138provides control information to external voltage regulator 160 via adigital interface 162 to cause the voltage regulator to generate theappropriate regulated voltage. PCU 138 also provides control informationto IVRs 125 via another digital interface 163 to control the operatingvoltage generated (or to cause a corresponding IVR to be disabled in alow power mode). In various embodiments, PCU 138 may include a varietyof power management logic units to perform hardware-based powermanagement. Such power management may be wholly processor controlled(e.g., by various processor hardware, and which may be triggered byworkload and/or power, thermal or other processor constraints) and/orthe power management may be performed responsive to external sources(such as a platform or power management source or system software).

In FIG. 1, PCU 138 is illustrated as being present as a separate logicof the processor. In other cases, PCU 138 may execute on a given one ormore of cores 120. In some cases, PCU 138 may be implemented as amicrocontroller (dedicated or general-purpose) or other control logicconfigured to execute its own dedicated power management code, sometimesreferred to as P-code. In yet other embodiments, power managementoperations to be performed by PCU 138 may be implemented externally to aprocessor, such as by way of a separate power management integratedcircuit (PMIC) or another component external to the processor. In yetother embodiments, power management operations to be performed by PCU138 may be implemented within BIOS or other system software.

Embodiments may be particularly suitable for a multicore processor inwhich each of multiple cores can operate at an independent voltage andfrequency point. As used herein the term “domain” is used to mean acollection of hardware and/or logic that operates at the same voltageand frequency point. In addition, a multicore processor can furtherinclude other non-core processing engines such as fixed function units,graphics engines, and so forth. Such processor can include independentdomains other than the cores, such as one or more domains associatedwith a graphics engine (referred to herein as a graphics domain) and oneor more domains associated with non-core circuitry, referred to hereinas a system agent. Although many implementations of a multi-domainprocessor can be formed on a single semiconductor die, otherimplementations can be realized by a multi-chip package in whichdifferent domains can be present on different semiconductor die of asingle package.

While not shown for ease of illustration, understand that additionalcomponents may be present within processor 110 such as non-core logic,and other components such as internal memories, e.g., one or more levelsof a cache memory hierarchy and so forth. Furthermore, while shown inthe implementation of FIG. 1 with an integrated voltage regulator,embodiments are not so limited. For example, other regulated voltagesmay be provided to on-chip resources from external voltage regulator 160or one or more additional external sources of regulated voltages.

Note that the power management techniques described herein may beindependent of and complementary to an operating system (OS)-based powermanagement (OSPM) mechanism. According to one example OSPM technique, aprocessor can operate at various performance states or levels, so-calledP-states, namely from P0 to PN. In general, the P1 performance state maycorrespond to the highest guaranteed performance state that can berequested by an OS. In addition to this P1 state, the OS can furtherrequest a higher performance state, namely a P0 state. This P0 state maythus be an opportunistic, overclocking, or turbo mode state in which,when power and/or thermal budget is available, processor hardware canconfigure the processor or at least portions thereof to operate at ahigher than guaranteed frequency. In many implementations, a processorcan include multiple so-called bin frequencies above the P1 guaranteedmaximum frequency, exceeding to a maximum peak frequency of theparticular processor, as fused or otherwise written into the processorduring manufacture. In addition, according to one OSPM mechanism, aprocessor can operate at various power states or levels. With regard topower states, an OSPM mechanism may specify different power consumptionstates, generally referred to as C-states, C0, C1 to Cn states. When acore is active, it runs at a C0 state, and when the core is idle it maybe placed in a core low power state, also called a core non-zero C-state(e.g., C1-C6 states), with each C-state being at a lower powerconsumption level (such that C6 is a deeper low power state than C1, andso forth).

Understand that many different types of power management techniques maybe used individually or in combination in different embodiments. Asrepresentative examples, a power controller may control the processor tobe power managed by some form of dynamic voltage frequency scaling(DVFS) in which an operating voltage and/or operating frequency of oneor more cores or other processor logic may be dynamically controlled toreduce power consumption in certain situations. In an example, DVFS maybe performed using Enhanced Intel SpeedStep™ technology available fromIntel Corporation, Santa Clara, Calif., to provide optimal performanceat a lowest power consumption level. In another example, DVFS may beperformed using Intel TurboBoost™ technology to enable one or more coresor other compute engines to operate at a higher than guaranteedoperating frequency based on conditions (e.g., workload andavailability).

Another power management technique that may be used in certain examplesis dynamic swapping of workloads between different compute engines. Forexample, the processor may include asymmetric cores or other processingengines that operate at different power consumption levels, such that ina power constrained situation, one or more workloads can be dynamicallyswitched to execute on a lower power core or other compute engine.Another exemplary power management technique is hardware duty cycling(HDC), which may cause cores and/or other compute engines to beperiodically enabled and disabled according to a duty cycle, such thatone or more cores may be made inactive during an inactive period of theduty cycle and made active during an active period of the duty cycle.

Power management techniques also may be used when constraints exist inan operating environment. For example, when a power and/or thermalconstraint is encountered, power may be reduced by reducing operatingfrequency and/or voltage. Other power management techniques includethrottling instruction execution rate or limiting scheduling ofinstructions. Still further, it is possible for instructions of a giveninstruction set architecture to include express or implicit direction asto power management operations. Although described with these particularexamples, understand that many other power management techniques may beused in particular embodiments.

Embodiments can be implemented in processors for various marketsincluding server processors, desktop processors, mobile processors andso forth. Referring now to FIG. 2, shown is a block diagram of aprocessor in accordance with an embodiment of the present invention. Asshown in FIG. 2, processor 200 may be a multicore processor including aplurality of cores 210 _(a)-210 _(n). In one embodiment, each such coremay be of an independent power domain and can be configured to enter andexit active states and/or maximum performance states based on workload.One or more cores 210 may be heterogeneous to the other cores, e.g.,having different micro-architectures, instruction set architectures,pipeline depths, power and performance capabilities. The various coresmay be coupled via an interconnect 215 to a system agent 220 thatincludes various components. As seen, the system agent 220 may include ashared cache 230 which may be a last level cache. In addition, thesystem agent may include an integrated memory controller 240 tocommunicate with a system memory (not shown in FIG. 2), e.g., via amemory bus. The system agent 220 also includes various interfaces 250and a power control unit 255, which may include logic to perform thepower management techniques described herein.

In addition, by interfaces 250 a-250 n, connection can be made tovarious off-chip components such as peripheral devices, mass storage andso forth. While shown with this particular implementation in theembodiment of FIG. 2, the scope of the present invention is not limitedin this regard.

Referring now to FIG. 3, shown is a block diagram of a multi-domainprocessor in accordance with another embodiment of the presentinvention. As shown in the embodiment of FIG. 3, processor 300 includesmultiple domains. Specifically, a core domain 310 can include aplurality of cores 310 a-310 n, a graphics domain 320 can include one ormore graphics engines, and a system agent domain 350 may further bepresent. In some embodiments, system agent domain 350 may execute at anindependent frequency than the core domain and may remain powered on atall times to handle power control events and power management such thatdomains 310 and 320 can be controlled to dynamically enter into and exithigh power and low power states. Each of domains 310 and 320 may operateat different voltage and/or power. Note that while only shown with threedomains, understand the scope of the present invention is not limited inthis regard and additional domains can be present in other embodiments.For example, multiple core domains may be present each including atleast one core.

In general, each of the cores 310 a-310 n may further include low levelcaches in addition to various execution units and additional processingelements. In turn, the various cores may be coupled to each other and toa shared cache memory formed of a plurality of units of a last levelcache (LLC) 340 a-340 n. In various embodiments, LLC 340 may be sharedamongst the cores and the graphics engine, as well as various mediaprocessing circuitry. As seen, a ring interconnect 330 thus couples thecores together, and provides interconnection between the cores, graphicsdomain 320 and system agent domain 350. In one embodiment, interconnect330 can be part of the core domain. However, in other embodiments thering interconnect can be of its own domain.

As further seen, system agent domain 350 may include display controller352 which may provide control of and an interface to an associateddisplay. As further seen, system agent domain 350 may include a powercontrol unit 355 which can include logic to perform the power managementtechniques described herein.

As further seen in FIG. 3, processor 300 can further include anintegrated memory controller (IMC) 370 that can provide for an interfaceto a system memory, such as a dynamic random access memory (DRAM).Multiple interfaces 380 a-380 n may be present to enable interconnectionbetween the processor and other circuitry. For example, in oneembodiment at least one direct media interface (DMI) interface may beprovided as well as one or more PCIe™ interfaces. Still further, toprovide for communications between other agents such as additionalprocessors or other circuitry, one or more QPI interfaces may also beprovided. Although shown at this high level in the embodiment of FIG. 3,understand the scope of the present invention is not limited in thisregard.

Referring to FIG. 4, an embodiment of a processor including multiplecores is illustrated. Processor 400 includes any processor or processingdevice, such as a microprocessor, an embedded processor, a digitalsignal processor (DSP), a network processor, a handheld processor, anapplication processor, a co-processor, a system on a chip (SoC), orother device to execute code. Processor 400, in one embodiment, includesat least two cores—cores 401 and 402, which may include asymmetric coresor symmetric cores (the illustrated embodiment). However, processor 400may include any number of processing elements that may be symmetric orasymmetric.

In one embodiment, a processing element refers to hardware or logic tosupport a software thread. Examples of hardware processing elementsinclude: a thread unit, a thread slot, a thread, a process unit, acontext, a context unit, a logical processor, a hardware thread, a core,and/or any other element, which is capable of holding a state for aprocessor, such as an execution state or architectural state. In otherwords, a processing element, in one embodiment, refers to any hardwarecapable of being independently associated with code, such as a softwarethread, operating system, application, or other code. A physicalprocessor typically refers to an integrated circuit, which potentiallyincludes any number of other processing elements, such as cores orhardware threads.

A core often refers to logic located on an integrated circuit capable ofmaintaining an independent architectural state, wherein eachindependently maintained architectural state is associated with at leastsome dedicated execution resources. In contrast to cores, a hardwarethread typically refers to any logic located on an integrated circuitcapable of maintaining an independent architectural state, wherein theindependently maintained architectural states share access to executionresources. As can be seen, when certain resources are shared and othersare dedicated to an architectural state, the line between thenomenclature of a hardware thread and core overlaps. Yet often, a coreand a hardware thread are viewed by an operating system as individuallogical processors, where the operating system is able to individuallyschedule operations on each logical processor.

Physical processor 400, as illustrated in FIG. 4, includes two cores,cores 401 and 402. Here, cores 401 and 402 are considered symmetriccores, i.e., cores with the same configurations, functional units,and/or logic. In another embodiment, core 401 includes an out-of-orderprocessor core, while core 402 includes an in-order processor core.However, cores 401 and 402 may be individually selected from any type ofcore, such as a native core, a software managed core, a core adapted toexecute a native instruction set architecture (ISA), a core adapted toexecute a translated ISA, a co-designed core, or other known core. Yetto further the discussion, the functional units illustrated in core 401are described in further detail below, as the units in core 402 operatein a similar manner.

As depicted, core 401 includes two architectural state registers 401 aand 401 b, which may be associated with two hardware threads (alsoreferred to as hardware thread slots). Therefore, software entities,such as an operating system, in one embodiment potentially viewprocessor 400 as four separate processors, i.e., four logical processorsor processing elements capable of executing four software threadsconcurrently. As alluded to above, a first thread is associated witharchitecture state registers 401 a, a second thread is associated witharchitecture state registers 401 b, a third thread may be associatedwith architecture state registers 402 a, and a fourth thread may beassociated with architecture state registers 402 b. Here, thearchitecture state registers (401 a, 401 b, 402 a, and 402 b) may beassociated with processing elements, thread slots, or thread units, asdescribed above. As illustrated, architecture state registers 401 a arereplicated in architecture state registers 401 b, so individualarchitecture states/contexts are capable of being stored for logicalprocessor 401 a and logical processor 401 b. In core 401, other smallerresources, such as instruction pointers and renaming logic in allocatorand renamer block 430 may also be replicated for threads 401 a and 401b. Some resources, such as re-order buffers in reorder/retirement unit435, branch target buffer and instruction translation lookaside buffer(BTB and I-TLB) 420, load/store buffers, and queues may be sharedthrough partitioning. Other resources, such as general purpose internalregisters, page-table base register(s), low-level data-cache anddata-TLB 450, execution unit(s) 440, and portions of reorder/retirementunit 435 are potentially fully shared.

Processor 400 often includes other resources, which may be fully shared,shared through partitioning, or dedicated by/to processing elements. InFIG. 4, an embodiment of a purely exemplary processor with illustrativelogical units/resources of a processor is illustrated. Note that aprocessor may include, or omit, any of these functional units, as wellas include any other known functional units, logic, or firmware notdepicted. As illustrated, core 401 includes a simplified, representativeout-of-order (OOO) processor core. But an in-order processor may beutilized in different embodiments.

Core 401 further includes decode module 425 coupled to a fetch unit todecode fetched elements. Fetch logic, in one embodiment, includesindividual sequencers associated with thread slots 401 a, 401 b,respectively. Usually core 401 is associated with a first ISA, whichdefines/specifies instructions executable on processor 400. Oftenmachine code instructions that are part of the first ISA include aportion of the instruction (referred to as an opcode), whichreferences/specifies an instruction or operation to be performed. Decodemodule 425 includes circuitry that recognizes these instructions fromtheir opcodes and passes the decoded instructions on in the pipeline forprocessing as defined by the first ISA. For example, decoder module 425,in one embodiment, includes logic designed or adapted to recognizespecific instructions, such as transactional instructions. As a resultof the recognition by the decoder module 425, the architecture or core401 takes specific, predefined actions to perform tasks associated withthe appropriate instruction. It is important to note that any of thetasks, blocks, operations, and methods described herein may be performedin response to a single or multiple instructions; some of which may benew or old instructions.

In one example, allocator and renamer block 430 includes an allocator toreserve resources, such as register files to store instructionprocessing results. However, threads 401 a and 401 b are potentiallycapable of out-of-order execution, where allocator and renamer block 430also reserves other resources, such as reorder buffers to trackinstruction results. The renamer block 430 may also include a registerrenamer to rename program/instruction reference registers to otherregisters internal to processor 400. Reorder/retirement unit 435includes components, such as the reorder buffers mentioned above, loadbuffers, and store buffers, to support out-of-order execution and laterin-order retirement of instructions executed out-of-order.

Scheduler and execution unit(s) block 440, in one embodiment, includes ascheduler unit to schedule instructions/operation on execution units.For example, a floating point instruction is scheduled on a port of anexecution unit that has an available floating point execution unit.Register files associated with the execution units are also included tostore information instruction processing results. Exemplary executionunits include a floating point execution unit, an integer executionunit, a jump execution unit, a load execution unit, a store executionunit, and other known execution units.

Lower level data cache and data translation lookaside buffer (D-TLB) 450are coupled to execution unit(s) 440. The data cache is to storerecently used/operated on elements, such as data operands, which arepotentially held in memory coherency states. The D-TLB is to storerecent virtual/linear to physical address translations. As a specificexample, a processor may include a page table structure to breakphysical memory into a plurality of virtual pages.

Here, cores 401 and 402 share access to higher-level or further-outcache 410, which is to cache recently fetched elements. Note thathigher-level or further-out refers to cache levels increasing or gettingfurther away from the execution unit(s). In one embodiment, higher-levelcache 410 is a last-level data cache—last cache in the memory hierarchyon processor 400—such as a second or third level data cache. However,higher level cache 410 is not so limited, as it may be associated withor includes an instruction cache. A trace cache—a type of instructioncache—instead may be coupled after decoder module 425 to store recentlydecoded traces.

In the depicted configuration, processor 400 also includes bus interface405 and a power control unit 460, which may perform power management inaccordance with an embodiment of the present invention. In thisscenario, bus interface 405 is to communicate with devices external toprocessor 400, such as system memory and other components.

A memory controller 470 may interface with other devices such as one ormany memories. In an example, bus interface 405 includes a ringinterconnect with a memory controller for interfacing with a memory anda graphics controller for interfacing with a graphics processor. In anSoC environment, even more devices, such as a network interface,coprocessors, memory, graphics processor, and any other known computerdevices/interface may be integrated on a single die or integratedcircuit to provide small form factor with high functionality and lowpower consumption.

Referring now to FIG. 5, shown is a block diagram of amicro-architecture of a processor core in accordance with one embodimentof the present invention. As shown in FIG. 5, processor core 500 may bea multi-stage pipelined out-of-order processor. Core 500 may operate atvarious voltages based on a received operating voltage, which may bereceived from an integrated voltage regulator or external voltageregulator.

As seen in FIG. 5, core 500 includes front end units 510, which may beused to fetch instructions to be executed and prepare them for use laterin the processor pipeline. For example, front end units 510 may includea fetch unit 501, an instruction cache 503, and an instruction decoder505. In some implementations, front end units 510 may further include atrace cache, along with microcode storage as well as a micro-operationstorage. Fetch unit 501 may fetch macro-instructions, e.g., from memoryor instruction cache 503, and feed them to instruction decoder 505 todecode them into primitives, i.e., micro-operations for execution by theprocessor.

Coupled between front end units 510 and execution units 520 is anout-of-order (OOO) engine 515 that may be used to receive themicro-instructions and prepare them for execution. More specifically OOOengine 515 may include various buffers to re-order micro-instructionflow and allocate various resources needed for execution, as well as toprovide renaming of logical registers onto storage locations withinvarious register files such as register file 530 and extended registerfile 535. Register file 530 may include separate register files forinteger and floating point operations. For purposes of configuration,control, and additional operations, a set of machine specific registers(MSRs) 538 may also be present and accessible to various logic withincore 500 (and external to the core).

Various resources may be present in execution units 520, including, forexample, various integer, floating point, and single instructionmultiple data (SIMD) logic units, among other specialized hardware. Forexample, such execution units may include one or more arithmetic logicunits (ALUs) 522 and one or more vector execution units 524, among othersuch execution units.

Results from the execution units may be provided to retirement logic,namely a reorder buffer (ROB) 540. More specifically, ROB 540 mayinclude various arrays and logic to receive information associated withinstructions that are executed. This information is then examined by ROB540 to determine whether the instructions can be validly retired andresult data committed to the architectural state of the processor, orwhether one or more exceptions occurred that prevent a proper retirementof the instructions. Of course, ROB 540 may handle other operationsassociated with retirement.

As shown in FIG. 5, ROB 540 is coupled to a cache 550 which, in oneembodiment may be a low level cache (e.g., an L1 cache) although thescope of the present invention is not limited in this regard. Also,execution units 520 can be directly coupled to cache 550. From cache550, data communication may occur with higher level caches, systemmemory and so forth. While shown with this high level in the embodimentof FIG. 5, understand the scope of the present invention is not limitedin this regard. For example, while the implementation of FIG. 5 is withregard to an out-of-order machine such as of an Intel® x86 instructionset architecture (ISA), the scope of the present invention is notlimited in this regard. That is, other embodiments may be implemented inan in-order processor, a reduced instruction set computing (RISC)processor such as an ARM-based processor, or a processor of another typeof ISA that can emulate instructions and operations of a different ISAvia an emulation engine and associated logic circuitry.

Referring now to FIG. 6, shown is a block diagram of amicro-architecture of a processor core in accordance with anotherembodiment. In the embodiment of FIG. 6, core 600 may be a low powercore of a different micro-architecture, such as an Intel® Atom™-basedprocessor having a relatively limited pipeline depth designed to reducepower consumption. As seen, core 600 includes an instruction cache 610coupled to provide instructions to an instruction decoder 615. A branchpredictor 605 may be coupled to instruction cache 610. Note thatinstruction cache 610 may further be coupled to another level of a cachememory, such as an L2 cache (not shown for ease of illustration in FIG.6). In turn, instruction decoder 615 provides decoded instructions to anissue queue (IQ) 620 for storage and delivery to a given executionpipeline. A microcode ROM 618 is coupled to instruction decoder 615.

A floating point pipeline 630 includes a floating point (FP) registerfile 632 which may include a plurality of architectural registers of agiven bit width such as 128, 256 or 512 bits. Pipeline 630 includes afloating point scheduler 634 to schedule instructions for execution onone of multiple execution units of the pipeline. In the embodimentshown, such execution units include an arithmetic logic unit (ALU) 635,a shuffle unit 636, and a floating point (FP) adder 638. In turn,results generated in these execution units may be provided back tobuffers and/or registers of register file 632. Of course understandwhile shown with these few example execution units, additional ordifferent floating point execution units may be present in anotherembodiment.

An integer pipeline 640 also may be provided. In the embodiment shown,pipeline 640 includes an integer (INT) register file 642 which mayinclude a plurality of architectural registers of a given bit width suchas 128 or 256 bits. Pipeline 640 includes an integer execution (IE)scheduler 644 to schedule instructions for execution on one of multipleexecution units of the pipeline. In the embodiment shown, such executionunits include an ALU 645, a shifter unit 646, and a jump execution unit(JEU) 648. In turn, results generated in these execution units may beprovided back to buffers and/or registers of register file 642. Ofcourse, understand while shown with these few example execution units,additional or different integer execution units may be present inanother embodiment.

A memory execution (ME) scheduler 650 may schedule memory operations forexecution in an address generation unit (AGU) 652, which is also coupledto a TLB 654. As seen, these structures may couple to a data cache 660,which may be a L0 and/or L1 data cache that in turn couples toadditional levels of a cache memory hierarchy, including an L2 cachememory.

To provide support for out-of-order execution, an allocator/renamer 670may be provided, in addition to a reorder buffer 680, which isconfigured to reorder instructions executed out of order for retirementin order. Although shown with this particular pipeline architecture inthe illustration of FIG. 6, understand that many variations andalternatives are possible.

Note that in a processor having asymmetric cores, such as in accordancewith the micro-architectures of FIGS. 5 and 6, workloads may bedynamically swapped between the cores for power management reasons, asthese cores, although having different pipeline designs and depths, maybe of the same or related ISA. Such dynamic core swapping may beperformed in a manner transparent to a user application (and possiblykernel also).

Referring to FIG. 7, shown is a block diagram of a micro-architecture ofa processor core in accordance with yet another embodiment. Asillustrated in FIG. 7, a core 700 may include a multi-staged in-orderpipeline to execute at very low power consumption levels. As one suchexample, core 700 may have a micro-architecture in accordance with anARM Cortex A53 design available from ARM Holdings, LTD., Sunnyvale,Calif. In an implementation, an 8-stage pipeline may be provided that isconfigured to execute both 32-bit and 64-bit code. Core 700 includes afetch unit 710 that is configured to fetch instructions and provide themto a decode unit 715, which may decode the instructions, e.g.,macro-instructions of a given ISA such as an ARMv8 ISA. Note furtherthat a queue 730 may couple to decode unit 715 to store decodedinstructions. Decoded instructions are provided to an issue logic 725,where the decoded instructions may be issued to a given one of multipleexecution units.

With further reference to FIG. 7, issue logic 725 may issue instructionsto one of multiple execution units. In the embodiment shown, theseexecution units include an integer unit 735, a multiply unit 740, afloating point/vector unit 750, a dual issue unit 760, and a load/storeunit 770. The results of these different execution units may be providedto a writeback (WB) unit 780. Understand that while a single writebackunit is shown for ease of illustration, in some implementations separatewriteback units may be associated with each of the execution units.Furthermore, understand that while each of the units and logic shown inFIG. 7 is represented at a high level, a particular implementation mayinclude more or different structures. A processor designed using one ormore cores having a pipeline as in FIG. 7 may be implemented in manydifferent end products, extending from mobile devices to server systems.

Referring to FIG. 8, shown is a block diagram of a micro-architecture ofa processor core in accordance with a still further embodiment. Asillustrated in FIG. 8, a core 800 may include a multi-stage multi-issueout-of-order pipeline to execute at very high performance levels (whichmay occur at higher power consumption levels than core 700 of FIG. 7).As one such example, processor 800 may have a microarchitecture inaccordance with an ARM Cortex A57 design. In an implementation, a 15 (orgreater)-stage pipeline may be provided that is configured to executeboth 32-bit and 64-bit code. In addition, the pipeline may provide for 3(or greater)-wide and 3 (or greater)-issue operation. Core 800 includesa fetch unit 810 that is configured to fetch instructions and providethem to a decoder/renamer/dispatcher unit 815 coupled to a cache 820.Unit 815 may decode the instructions, e.g., macro-instructions of anARMv8 instruction set architecture, rename register references withinthe instructions, and dispatch the instructions (eventually) to aselected execution unit. Decoded instructions may be stored in a queue825. Note that while a single queue structure is shown for ease ofillustration in FIG. 8, understand that separate queues may be providedfor each of the multiple different types of execution units.

Also shown in FIG. 8 is an issue logic 830 from which decodedinstructions stored in queue 825 may be issued to a selected executionunit. Issue logic 830 also may be implemented in a particular embodimentwith a separate issue logic for each of the multiple different types ofexecution units to which issue logic 830 couples.

Decoded instructions may be issued to a given one of multiple executionunits. In the embodiment shown, these execution units include one ormore integer units 835, a multiply unit 840, a floating point/vectorunit 850, a branch unit 860, and a load/store unit 870. In anembodiment, floating point/vector unit 850 may be configured to handleSIMD or vector data of 128 or 256 bits. Still further, floatingpoint/vector execution unit 850 may perform IEEE-754 double precisionfloating-point operations. The results of these different executionunits may be provided to a writeback unit 880. Note that in someimplementations separate writeback units may be associated with each ofthe execution units. Furthermore, understand that while each of theunits and logic shown in FIG. 8 is represented at a high level, aparticular implementation may include more or different structures.

Note that in a processor having asymmetric cores, such as in accordancewith the micro-architectures of FIGS. 7 and 8, workloads may bedynamically swapped for power management reasons, as these cores,although having different pipeline designs and depths, may be of thesame or related ISA. Such dynamic core swapping may be performed in amanner transparent to a user application (and possibly kernel also).

A processor designed using one or more cores having pipelines as in anyone or more of FIGS. 5-8 may be implemented in many different endproducts, extending from mobile devices to server systems. Referring nowto FIG. 9, shown is a block diagram of a processor in accordance withanother embodiment of the present invention. In the embodiment of FIG.9, processor 900 may be a SoC including multiple domains, each of whichmay be controlled to operate at an independent operating voltage andoperating frequency. As a specific illustrative example, processor 900may be an Intel® Architecture Core™-based processor such as an i3, i5,i7 or another such processor available from Intel Corporation. However,other low power processors such as available from Advanced MicroDevices, Inc. (AMD) of Sunnyvale, Calif., an ARM-based design from ARMHoldings, Ltd. or licensee thereof or a MIPS-based design from MIPSTechnologies, Inc. of Sunnyvale, Calif., or their licensees or adoptersmay instead be present in other embodiments such as an Apple A7processor, a Qualcomm Snapdragon processor, or Texas Instruments OMAPprocessor. Such SoC may be used in a low power system such as asmartphone, tablet computer, phablet computer, Ultrabook™ computer orother portable computing device, which may incorporate a heterogeneoussystem architecture having a heterogeneous system architecture-basedprocessor design.

In the high level view shown in FIG. 9, processor 900 includes aplurality of core units 910 a-910 n. Each core unit may include one ormore processor cores, one or more cache memories and other circuitry.Each core unit 910 may support one or more instruction sets (e.g., anx86 instruction set (with some extensions that have been added withnewer versions); a MIPS instruction set; an ARM instruction set (withoptional additional extensions such as NEON)) or other instruction setor combinations thereof. Note that some of the core units may beheterogeneous resources (e.g., of a different design). In addition, eachsuch core may be coupled to a cache memory (not shown) which in anembodiment may be a shared level two (L2) cache memory. A non-volatilestorage 930 may be used to store various program and other data. Forexample, this storage may be used to store at least portions ofmicrocode, boot information such as a BIOS, other system software or soforth.

Each core unit 910 may also include an interface such as a bus interfaceunit to enable interconnection to additional circuitry of the processor.In an embodiment, each core unit 910 couples to a coherent fabric thatmay act as a primary cache coherent on-die interconnect that in turncouples to a memory controller 935. In turn, memory controller 935controls communications with a memory such as a DRAM (not shown for easeof illustration in FIG. 9).

In addition to core units, additional processing engines are presentwithin the processor, including at least one graphics unit 920 which mayinclude one or more graphics processing units (GPUs) to perform graphicsprocessing as well as to possibly execute general purpose operations onthe graphics processor (so-called GPGPU operation). In addition, atleast one image signal processor 925 may be present. Signal processor925 may be configured to process incoming image data received from oneor more capture devices, either internal to the SoC or off-chip.

Other accelerators also may be present. In the illustration of FIG. 9, avideo coder 950 may perform coding operations including encoding anddecoding for video information, e.g., providing hardware accelerationsupport for high definition video content. A display controller 955further may be provided to accelerate display operations includingproviding support for internal and external displays of a system. Inaddition, a security processor 945 may be present to perform securityoperations such as secure boot operations, various cryptographyoperations and so forth.

Each of the units may have its power consumption controlled via a powermanager 940, which may include control logic to perform the variouspower management techniques described herein.

In some embodiments, processor 900 may further include a non-coherentfabric coupled to the coherent fabric to which various peripheraldevices may couple. One or more interfaces 960 a-960 d enablecommunication with one or more off-chip devices. Such communications maybe via a variety of communication protocols such as PCIe™, GPIO, USB,I²C, UART, MIPI, SDIO, DDR, SPI, HDMI, among other types ofcommunication protocols. Although shown at this high level in theembodiment of FIG. 9, understand the scope of the present invention isnot limited in this regard.

Referring now to FIG. 10, shown is a block diagram of a representativeSoC. In the embodiment shown, SoC 1000 may be a multi-core SoCconfigured for low power operation to be optimized for incorporationinto a smartphone or other low power device such as a tablet computer orother portable computing device. As an example, SoC 1000 may beimplemented using asymmetric or different types of cores, such ascombinations of higher power and/or low power cores, e.g., out-of-ordercores and in-order cores. In different embodiments, these cores may bebased on an Intel® Architecture™ core design or an ARM architecturedesign. In yet other embodiments, a mix of Intel and ARM cores may beimplemented in a given SoC.

As seen in FIG. 10, SoC 1000 includes a first core domain 1010 having aplurality of first cores 1012 a-1012 d. In an example, these cores maybe low power cores such as in-order cores. In one embodiment, thesefirst cores may be implemented as ARM Cortex A53 cores. In turn, thesecores couple to a cache memory 1015 of core domain 1010. In addition,SoC 1000 includes a second core domain 1020. In the illustration of FIG.10, second core domain 1020 has a plurality of second cores 1022 a-1022d. In an example, these cores may be higher power-consuming cores thanfirst cores 1012. In an embodiment, the second cores may be out-of-ordercores, which may be implemented as ARM Cortex A57 cores. In turn, thesecores couple to a cache memory 1025 of core domain 1020. Note that whilethe example shown in FIG. 10 includes 4 cores in each domain, understandthat more or fewer cores may be present in a given domain in otherexamples.

With further reference to FIG. 10, a graphics domain 1030 also isprovided, which may include one or more graphics processing units (GPUs)configured to independently execute graphics workloads, e.g., providedby one or more cores of core domains 1010 and 1020. As an example, GPUdomain 1030 may be used to provide display support for a variety ofscreen sizes, in addition to providing graphics and display renderingoperations.

As seen, the various domains couple to a coherent interconnect 1040,which in an embodiment may be a cache coherent interconnect fabric thatin turn couples to an integrated memory controller 1050. Coherentinterconnect 1040 may include a shared cache memory, such as an L3cache, in some examples. In an embodiment, memory controller 1050 may bea direct memory controller to provide for multiple channels ofcommunication with an off-chip memory, such as multiple channels of aDRAM (not shown for ease of illustration in FIG. 10).

In different examples, the number of the core domains may vary. Forexample, for a low power SoC suitable for incorporation into a mobilecomputing device, a limited number of core domains such as shown in FIG.10 may be present. Still further, in such low power SoCs, core domain1020 including higher power cores may have fewer numbers of such cores.For example, in one implementation two cores 1022 may be provided toenable operation at reduced power consumption levels. In addition, thedifferent core domains may also be coupled to an interrupt controller toenable dynamic swapping of workloads between the different domains.

In yet other embodiments, a greater number of core domains, as well asadditional optional IP logic may be present, in that an SoC can bescaled to higher performance (and power) levels for incorporation intoother computing devices, such as desktops, servers, high performancecomputing systems, base stations forth. As one such example, 4 coredomains each having a given number of out-of-order cores may beprovided. Still further, in addition to optional GPU support (which asan example may take the form of a GPGPU), one or more accelerators toprovide optimized hardware support for particular functions (e.g. webserving, network processing, switching or so forth) also may beprovided. In addition, an input/output interface may be present tocouple such accelerators to off-chip components.

Referring now to FIG. 11, shown is a block diagram of another exampleSoC. In the embodiment of FIG. 11, SoC 1100 may include variouscircuitry to enable high performance for multimedia applications,communications and other functions. As such, SoC 1100 is suitable forincorporation into a wide variety of portable and other devices, such assmartphones, tablet computers, smart TVs and so forth. In the exampleshown, SoC 1100 includes a central processor unit (CPU) domain 1110. Inan embodiment, a plurality of individual processor cores may be presentin CPU domain 1110. As one example, CPU domain 1110 may be a quad coreprocessor having 4 multithreaded cores. Such processors may behomogeneous or heterogeneous processors, e.g., a mix of low power andhigh power processor cores.

In turn, a GPU domain 1120 is provided to perform advanced graphicsprocessing in one or more GPUs to handle graphics and compute APIs. ADSP unit 1130 may provide one or more low power DSPs for handlinglow-power multimedia applications such as music playback, audio/videoand so forth, in addition to advanced calculations that may occur duringexecution of multimedia instructions. In turn, a communication unit 1140may include various components to provide connectivity via variouswireless protocols, such as cellular communications (including 3G/4GLTE), wireless local area protocols such as Bluetooth™ IEEE 802.11, andso forth.

Still further, a multimedia processor 1150 may be used to performcapture and playback of high definition video and audio content,including processing of user gestures. A sensor unit 1160 may include aplurality of sensors and/or a sensor controller to interface to variousoff-chip sensors present in a given platform. An image signal processor(ISP) 1170 may perform image processing with regard to captured contentfrom one or more cameras of a platform, including still and videocameras.

A display processor 1180 may provide support for connection to a highdefinition display of a given pixel density, including the ability towirelessly communicate content for playback on such display. Stillfurther, a location unit 1190 may include a Global Positioning System(GPS) receiver with support for multiple GPS constellations to provideapplications highly accurate positioning information obtained using assuch GPS receiver. Understand that while shown with this particular setof components in the example of FIG. 11, many variations andalternatives are possible.

Referring now to FIG. 12, shown is a block diagram of an example systemwith which embodiments can be used. As seen, system 1200 may be asmartphone or other wireless communicator. A baseband processor 1205 isconfigured to perform various signal processing with regard tocommunication signals to be transmitted from or received by the system.In turn, baseband processor 1205 is coupled to an application processor1210, which may be a main CPU of the system to execute an OS and othersystem software, in addition to user applications such as manywell-known social media and multimedia apps. Application processor 1210may further be configured to perform a variety of other computingoperations for the device.

In turn, application processor 1210 can couple to a userinterface/display 1220, e.g., a touch screen display. In addition,application processor 1210 may couple to a memory system including anon-volatile memory, namely a flash memory 1230 and a system memory,namely a dynamic random access memory (DRAM) 1235. As further seen,application processor 1210 further couples to a capture device 1241 suchas one or more image capture devices that can record video and/or stillimages.

Still referring to FIG. 12, a universal integrated circuit card (UICC)1246 comprising a subscriber identity module and possibly a securestorage and cryptoprocessor is also coupled to application processor1210. System 1200 may further include a security processor 1250 that maycouple to application processor 1210. A plurality of sensors 1225 maycouple to application processor 1210 to enable input of a variety ofsensed information such as accelerometer and other environmentalinformation. An audio output device 1295 may provide an interface tooutput sound, e.g., in the form of voice communications, played orstreaming audio data and so forth.

As further illustrated, a near field communication (NFC) contactlessinterface 1260 is provided that communicates in a NFC near field via anNFC antenna 1265. While separate antennae are shown in FIG. 12,understand that in some implementations one antenna or a different setof antennae may be provided to enable various wireless functionality.

A power management integrated circuit (PMIC) 1215 couples to applicationprocessor 1210 to perform platform level power management. To this end,PMIC 1215 may issue power management requests to application processor1210 to enter certain low power states as desired. Furthermore, based onplatform constraints, PMIC 1215 may also control the power level ofother components of system 1200.

To enable communications to be transmitted and received, variouscircuitry may be coupled between baseband processor 1205 and an antenna1290. Specifically, a radio frequency (RF) transceiver 1270 and awireless local area network (WLAN) transceiver 1275 may be present. Ingeneral, RF transceiver 1270 may be used to receive and transmitwireless data and calls according to a given wireless communicationprotocol such as 3G or 4G wireless communication protocol such as inaccordance with a code division multiple access (CDMA), global systemfor mobile communication (GSM), long term evolution (LTE) or otherprotocol. In addition a GPS sensor 1280 may be present. Other wirelesscommunications such as receipt or transmission of radio signals, e.g.,AM/FM and other signals may also be provided. In addition, via WLANtransceiver 1275, local wireless communications can also be realized.

Referring now to FIG. 13, shown is a block diagram of another examplesystem with which embodiments may be used. In the illustration of FIG.13, system 1300 may be mobile low-power system such as a tabletcomputer, 2:1 tablet, phablet or other convertible or standalone tabletsystem. As illustrated, a SoC 1310 is present and may be configured tooperate as an application processor for the device.

A variety of devices may couple to SoC 1310. In the illustration shown,a memory subsystem includes a flash memory 1340 and a DRAM 1345 coupledto SoC 1310. In addition, a touch panel 1320 is coupled to the SoC 1310to provide display capability and user input via touch, includingprovision of a virtual keyboard on a display of touch panel 1320. Toprovide wired network connectivity, SoC 1310 couples to an Ethernetinterface 1330. A peripheral hub 1325 is coupled to SoC 1310 to enableinterfacing with various peripheral devices, such as may be coupled tosystem 1300 by any of various ports or other connectors.

In addition to internal power management circuitry and functionalitywithin SoC 1310, a PMIC 1380 is coupled to SoC 1310 to provideplatform-based power management, e.g., based on whether the system ispowered by a battery 1390 or AC power via an AC adapter 1395. Inaddition to this power source-based power management, PMIC 1380 mayfurther perform platform power management activities based onenvironmental and usage conditions. Still further, PMIC 1380 maycommunicate control and status information to SoC 1310 to cause variouspower management actions within SoC 1310.

Still referring to FIG. 13, to provide for wireless capabilities, a WLANunit 1350 is coupled to SoC 1310 and in turn to an antenna 1355. Invarious implementations, WLAN unit 1350 may provide for communicationaccording to one or more wireless protocols.

As further illustrated, a plurality of sensors 1360 may couple to SoC1310. These sensors may include various accelerometer, environmental andother sensors, including user gesture sensors. Finally, an audio codec1365 is coupled to SoC 1310 to provide an interface to an audio outputdevice 1370. Of course understand that while shown with this particularimplementation in FIG. 13, many variations and alternatives arepossible.

Referring now to FIG. 14, shown is a block diagram of a representativecomputer system 1400 such as notebook, Ultrabook™ or other small formfactor system. A processor 1410, in one embodiment, includes amicroprocessor, multi-core processor, multithreaded processor, an ultralow voltage processor, an embedded processor, or other known processingelement. In the illustrated implementation, processor 1410 acts as amain processing unit and central hub for communication with many of thevarious components of the system 1400, and may include power managementcircuitry as described herein. As one example, processor 1410 isimplemented as a SoC.

Processor 1410, in one embodiment, communicates with a system memory1415. As an illustrative example, the system memory 1415 is implementedvia multiple memory devices or modules to provide for a given amount ofsystem memory.

To provide for persistent storage of information such as data,applications, one or more operating systems and so forth, a mass storage1420 may also couple to processor 1410. In various embodiments, toenable a thinner and lighter system design as well as to improve systemresponsiveness, this mass storage may be implemented via a SSD or themass storage may primarily be implemented using a hard disk drive (HDD)with a smaller amount of SSD storage to act as a SSD cache to enablenon-volatile storage of context state and other such information duringpower down events so that a fast power up can occur on re-initiation ofsystem activities. Also shown in FIG. 14, a flash device 1422 may becoupled to processor 1410, e.g., via a serial peripheral interface(SPI). This flash device may provide for non-volatile storage of systemsoftware, including a basic input/output software (BIOS) as well asother firmware of the system.

Various input/output (I/O) devices may be present within system 1400.Specifically shown in the embodiment of FIG. 14 is a display 1424 whichmay be a high definition LCD or LED panel that further provides for atouch screen 1425. In one embodiment, display 1424 may be coupled toprocessor 1410 via a display interconnect that can be implemented as ahigh performance graphics interconnect. Touch screen 1425 may be coupledto processor 1410 via another interconnect, which in an embodiment canbe an I²C interconnect. As further shown in FIG. 14, in addition totouch screen 1425, user input by way of touch can also occur via a touchpad 1430 which may be configured within the chassis and may also becoupled to the same I²C interconnect as touch screen 1425.

For perceptual computing and other purposes, various sensors may bepresent within the system and may be coupled to processor 1410 indifferent manners. Certain inertial and environmental sensors may coupleto processor 1410 through a sensor hub 1440, e.g., via an I²Cinterconnect. In the embodiment shown in FIG. 14, these sensors mayinclude an accelerometer 1441, an ambient light sensor (ALS) 1442, acompass 1443 and a gyroscope 1444. Other environmental sensors mayinclude one or more thermal sensors 1446 which in some embodimentscouple to processor 1410 via a system management bus (SMBus) bus.

As also seen in FIG. 14, various peripheral devices may couple toprocessor 1410 via a low pin count (LPC) interconnect. In the embodimentshown, various components can be coupled through an embedded controller1435. Such components can include a keyboard 1436 (e.g., coupled via aPS2 interface), a fan 1437, and a thermal sensor 1439. In someembodiments, touch pad 1430 may also couple to EC 1435 via a PS2interface. In addition, a security processor such as a trusted platformmodule (TPM) 1438 may also couple to processor 1410 via this LPCinterconnect.

System 1400 can communicate with external devices in a variety ofmanners, including wirelessly. In the embodiment shown in FIG. 14,various wireless modules, each of which can correspond to a radioconfigured for a particular wireless communication protocol, arepresent. One manner for wireless communication in a short range such asa near field may be via a NFC unit 1445 which may communicate, in oneembodiment with processor 1410 via an SMBus. Note that via this NFC unit1445, devices in close proximity to each other can communicate.

As further seen in FIG. 14, additional wireless units can include othershort range wireless engines including a WLAN unit 1450 and a Bluetooth™unit 1452. Using WLAN unit 1450, Wi-Fi™ communications can be realized,while via Bluetooth™ unit 1452, short range Bluetooth™ communicationscan occur. These units may communicate with processor 1410 via a givenlink.

In addition, wireless wide area communications, e.g., according to acellular or other wireless wide area protocol, can occur via a WWAN unit1456 which in turn may couple to a subscriber identity module (SIM)1457. In addition, to enable receipt and use of location information, aGPS module 1455 may also be present. Note that in the embodiment shownin FIG. 14, WWAN unit 1456 and an integrated capture device such as acamera module 1454 may communicate via a given link.

To provide for audio inputs and outputs, an audio processor can beimplemented via a digital signal processor (DSP) 1460, which may coupleto processor 1410 via a high definition audio (HDA) link. Similarly, DSP1460 may communicate with an integrated coder/decoder (CODEC) andamplifier 1462 that in turn may couple to output speakers 1463 which maybe implemented within the chassis. Similarly, amplifier and CODEC 1462can be coupled to receive audio inputs from a microphone 1465 which inan embodiment can be implemented via dual array microphones (such as adigital microphone array) to provide for high quality audio inputs toenable voice-activated control of various operations within the system.Note also that audio outputs can be provided from amplifier/CODEC 1462to a headphone jack 1464. Although shown with these particularcomponents in the embodiment of FIG. 14, understand the scope of thepresent invention is not limited in this regard.

Embodiments may be implemented in many different system types. Referringnow to FIG. 15A, shown is a block diagram of a system in accordance withan embodiment of the present invention. As shown in FIG. 15A,multiprocessor system 1500 is a point-to-point interconnect system, andincludes a first processor 1570 and a second processor 1580 coupled viaa point-to-point interconnect 1550. As shown in FIG. 15A, each ofprocessors 1570 and 1580 may be multicore processors, including firstand second processor cores (i.e., processor cores 1574 a and 1574 b andprocessor cores 1584 a and 1584 b), although potentially many more coresmay be present in the processors. Each of the processors can include aPCU or other power management logic to perform processor-based powermanagement as described herein.

Still referring to FIG. 15A, first processor 1570 further includes anintegrated memory controller (IMC) 1572 and point-to-point (P-P)interfaces 1576 and 1578. Similarly, second processor 1580 includes anIMC 1582 and P-P interfaces 1586 and 1588. As shown in FIG. 15, IMCs1572 and 1582 couple the processors to respective memories, namely amemory 1532 and a memory 1534, which may be portions of system memory(e.g., DRAM) locally attached to the respective processors. Firstprocessor 1570 and second processor 1580 may be coupled to a chipset1590 via P-P interconnects 1562 and 1564, respectively. As shown in FIG.15A, chipset 1590 includes P-P interfaces 1594 and 1598.

Furthermore, chipset 1590 includes an interface 1592 to couple chipset1590 with a high-performance graphics engine 1538, by a P-P interconnect1539. In turn, chipset 1590 may be coupled to a first bus 1516 via aninterface 1596. As shown in FIG. 15A, various input/output (I/O) devices1514 may be coupled to first bus 1516, along with a bus bridge 1518which couples first bus 1516 to a second bus 1520. Various devices maybe coupled to second bus 1520 including, for example, a keyboard/mouse1522, communication devices 1526 and a data storage unit 1528 such as adisk drive or other mass storage device which may include code 1530, inone embodiment. Further, an audio I/O 1524 may be coupled to second bus1520. Embodiments can be incorporated into other types of systemsincluding mobile devices such as a smart cellular telephone, tabletcomputer, netbook, Ultrabook™, or so forth.

Referring now to FIG. 15B, shown is a block diagram of a second morespecific exemplary system 1501 in accordance with an embodiment of thepresent invention. Like elements in FIG. 15A and FIG. 15B bear likereference numerals, and certain aspects of FIG. 15A have been omittedfrom FIG. 15B in order to avoid obscuring other aspects of FIG. 15B.

FIG. 15B illustrates that the processors 1570, 1580 may includeintegrated memory and I/O control logic (“CL”) 1571 and 1581,respectively. Thus, the control logic 1571 and 1581 include integratedmemory controller units and include I/O control logic. FIG. 15Nillustrates that not only are the memories 1532, 1534 coupled to thecontrol logic 1571 and 1581, but also that I/O devices 1513 are alsocoupled to the control logic 1571 and 1581. Legacy I/O devices 1515 arecoupled to the chipset 1590.

One or more aspects of at least one embodiment may be implemented byrepresentative code stored on a machine-readable medium which representsand/or defines logic within an integrated circuit such as a processor.For example, the machine-readable medium may include instructions whichrepresent various logic within the processor. When read by a machine,the instructions may cause the machine to fabricate the logic to performthe techniques described herein. Such representations, known as “IPcores,” are reusable units of logic for an integrated circuit that maybe stored on a tangible, machine-readable medium as a hardware modelthat describes the structure of the integrated circuit. The hardwaremodel may be supplied to various customers or manufacturing facilities,which load the hardware model on fabrication machines that manufacturethe integrated circuit. The integrated circuit may be fabricated suchthat the circuit performs operations described in association with anyof the embodiments described herein.

FIG. 16 is a block diagram illustrating an IP core development system1600 that may be used to manufacture an integrated circuit to performoperations according to an embodiment. The IP core development system1600 may be used to generate modular, reusable designs that can beincorporated into a larger design or used to construct an entireintegrated circuit (e.g., an SoC integrated circuit). A design facility1630 can generate a software simulation 1610 of an IP core design in ahigh-level programming language (e.g., C/C++). The software simulation1610 can be used to design, test, and verify the behavior of the IPcore. A register transfer level (RTL) design can then be created orsynthesized from the simulation model. The RTL design 1615 is anabstraction of the behavior of the integrated circuit that models theflow of digital signals between hardware registers, including theassociated logic performed using the modeled digital signals. Inaddition to an RTL design 1615, lower-level designs at the logic levelor transistor level may also be created, designed, or synthesized. Thus,the particular details of the initial design and simulation may vary.

The RTL design 1615 or equivalent may be further synthesized by thedesign facility into a hardware model 1620, which may be in a hardwaredescription language (HDL), or some other representation of physicaldesign data. The HDL may be further simulated or tested to verify the IPcore design. The IP core design can be stored for delivery to athird-party fabrication facility 1665 using non-volatile memory 1640(e.g., hard disk, flash memory, or any non-volatile storage medium).Alternately, the IP core design may be transmitted (e.g., via theInternet) over a wired connection 1650 or wireless connection 1660. Thefabrication facility 1665 may then fabricate an integrated circuit thatis based at least in part on the IP core design. The fabricatedintegrated circuit can be configured to perform operations in accordancewith the components and/or processes described herein.

FIGS. 17A-25 described below detail exemplary architectures and systemsto implement embodiments of the components and/or processes describedherein. In some embodiments, one or more hardware components and/orinstructions described herein are emulated as detailed below, or areimplemented as software modules.

Embodiments of the instruction(s) detailed above are embodied may beembodied in a “generic vector friendly instruction format” which isdetailed below. In other embodiments, such a format is not utilized andanother instruction format is used, however, the description below ofthe writemask registers, various data transformations (swizzle,broadcast, etc.), addressing, etc. is generally applicable to thedescription of the embodiments of the instruction(s) above.Additionally, exemplary systems, architectures, and pipelines aredetailed below. Embodiments of the instruction(s) above may be executedon such systems, architectures, and pipelines, but are not limited tothose detailed.

An instruction set may include one or more instruction formats. A giveninstruction format may define various fields (e.g., number of bits,location of bits) to specify, among other things, the operation to beperformed (e.g., opcode) and the operand(s) on which that operation isto be performed and/or other data field(s) (e.g., mask). Someinstruction formats are further broken down though the definition ofinstruction templates (or subformats). For example, the instructiontemplates of a given instruction format may be defined to have differentsubsets of the instruction format's fields (the included fields aretypically in the same order, but at least some have different bitpositions because there are less fields included) and/or defined to havea given field interpreted differently. Thus, each instruction of an ISAis expressed using a given instruction format (and, if defined, in agiven one of the instruction templates of that instruction format) andincludes fields for specifying the operation and the operands. Forexample, an exemplary ADD instruction has a specific opcode and aninstruction format that includes an opcode field to specify that opcodeand operand fields to select operands (source1/destination and source2);and an occurrence of this ADD instruction in an instruction stream willhave specific contents in the operand fields that select specificoperands. A set of SIMD extensions referred to as the Advanced VectorExtensions (AVX) (AVX1 and AVX2) and using the Vector Extensions (VEX)coding scheme has been released and/or published (e.g., see Intel® 64and IA-32 Architectures Software Developer's Manual, September 2014; andsee Intel® Advanced Vector Extensions Programming Reference, October2014).

Exemplary Instruction Formats

Embodiments of the instruction(s) described herein may be embodied indifferent formats. Additionally, exemplary systems, architectures, andpipelines are detailed below. Embodiments of the instruction(s) may beexecuted on such systems, architectures, and pipelines, but are notlimited to those detailed.

Generic Vector Friendly Instruction Format

A vector friendly instruction format is an instruction format that issuited for vector instructions (e.g., there are certain fields specificto vector operations). While embodiments are described in which bothvector and scalar operations are supported through the vector friendlyinstruction format, alternative embodiments use only vector operationsthe vector friendly instruction format.

FIGS. 17A-17B are block diagrams illustrating a generic vector friendlyinstruction format and instruction templates thereof according toembodiments of the invention. FIG. 17A is a block diagram illustrating ageneric vector friendly instruction format and class A instructiontemplates thereof according to embodiments of the invention; while FIG.17B is a block diagram illustrating the generic vector friendlyinstruction format and class B instruction templates thereof accordingto embodiments of the invention. Specifically, a generic vector friendlyinstruction format 1700 for which are defined class A and class Binstruction templates, both of which include no memory access 1705instruction templates and memory access 1720 instruction templates. Theterm generic in the context of the vector friendly instruction formatrefers to the instruction format not being tied to any specificinstruction set.

While embodiments of the invention will be described in which the vectorfriendly instruction format supports the following: a 64 byte vectoroperand length (or size) with 32 bit (4 byte) or 64 bit (8 byte) dataelement widths (or sizes) (and thus, a 64 byte vector consists of either16 doubleword-size elements or alternatively, 8 quadword-size elements);a 64 byte vector operand length (or size) with 16 bit (2 byte) or 8 bit(1 byte) data element widths (or sizes); a 32 byte vector operand length(or size) with 32 bit (4 byte), 64 bit (8 byte), 16 bit (2 byte), or 8bit (1 byte) data element widths (or sizes); and a 16 byte vectoroperand length (or size) with 32 bit (4 byte), 64 bit (8 byte), 16 bit(2 byte), or 8 bit (1 byte) data element widths (or sizes); alternativeembodiments may support more, less and/or different vector operand sizes(e.g., 256 byte vector operands) with more, less, or different dataelement widths (e.g., 128 bit (16 byte) data element widths).

The class A instruction templates in FIG. 17A include: 1) within the nomemory access 1705 instruction templates there is shown a no memoryaccess, full round control type operation 1710 instruction template anda no memory access, data transform type operation 1715 instructiontemplate; and 2) within the memory access 1720 instruction templatesthere is shown a memory access, temporal 1725 instruction template and amemory access, non-temporal 1730 instruction template. The class Binstruction templates in FIG. 17B include: 1) within the no memoryaccess 1705 instruction templates there is shown a no memory access,write mask control, partial round control type operation 1712instruction template and a no memory access, write mask control, vsizetype operation 1717 instruction template; and 2) within the memoryaccess 1720 instruction templates there is shown a memory access, writemask control 1727 instruction template.

The generic vector friendly instruction format 1700 includes thefollowing fields listed below in the order illustrated in FIGS. 17A-17B.

Format field 1740—a specific value (an instruction format identifiervalue) in this field uniquely identifies the vector friendly instructionformat, and thus occurrences of instructions in the vector friendlyinstruction format in instruction streams. As such, this field isoptional in the sense that it is not needed for an instruction set thathas only the generic vector friendly instruction format.

Base operation field 1742—its content distinguishes different baseoperations.

Register index field 1744—its content, directly or through addressgeneration, specifies the locations of the source and destinationoperands, be they in registers or in memory. These include a sufficientnumber of bits to select N registers from a P×Q (e.g. 32×512, 16×128,32×1024, 64×1024) register file. While in one embodiment N may be up tothree sources and one destination register, alternative embodiments maysupport more or less sources and destination registers (e.g., maysupport up to two sources where one of these sources also acts as thedestination, may support up to three sources where one of these sourcesalso acts as the destination, may support up to two sources and onedestination).

Modifier field 1746—its content distinguishes occurrences ofinstructions in the generic vector instruction format that specifymemory access from those that do not; that is, between no memory access1705 instruction templates and memory access 1720 instruction templates.Memory access operations read and/or write to the memory hierarchy (insome cases specifying the source and/or destination addresses usingvalues in registers), while non-memory access operations do not (e.g.,the source and destinations are registers). While in one embodiment thisfield also selects between three different ways to perform memoryaddress calculations, alternative embodiments may support more, less, ordifferent ways to perform memory address calculations.

Augmentation operation field 1750—its content distinguishes which one ofa variety of different operations to be performed in addition to thebase operation. This field is context specific. In one embodiment of theinvention, this field is divided into a class field 1768, an alpha field1752, and a beta field 1754. The augmentation operation field 1750allows common groups of operations to be performed in a singleinstruction rather than 2, 3, or 4 instructions.

Scale field 1760—its content allows for the scaling of the index field'scontent for memory address generation (e.g., for address generation thatuses 2^(scale)*index+base).

Displacement Field 1762A—its content is used as part of memory addressgeneration (e.g., for address generation that uses2^(scale)*index+base+displacement).

Displacement Factor Field 1762B (note that the juxtaposition ofdisplacement field 1762A directly over displacement factor field 1762Bindicates one or the other is used)—its content is used as part ofaddress generation; it specifies a displacement factor that is to bescaled by the size of a memory access (N)—where N is the number of bytesin the memory access (e.g., for address generation that uses2^(scale)*index+base+scaled displacement). Redundant low-order bits areignored and hence, the displacement factor field's content is multipliedby the memory operands total size (N) in order to generate the finaldisplacement to be used in calculating an effective address. The valueof N is determined by the processor hardware at runtime based on thefull opcode field 1774 (described later herein) and the datamanipulation field 1754C. The displacement field 1762A and thedisplacement factor field 1762B are optional in the sense that they arenot used for the no memory access 1705 instruction templates and/ordifferent embodiments may implement only one or none of the two.

Data element width field 1764—its content distinguishes which one of anumber of data element widths is to be used (in some embodiments for allinstructions; in other embodiments for only some of the instructions).This field is optional in the sense that it is not needed if only onedata element width is supported and/or data element widths are supportedusing some aspect of the opcodes.

Write mask field 1770—its content controls, on a per data elementposition basis, whether that data element position in the destinationvector operand reflects the result of the base operation andaugmentation operation. Class A instruction templates supportmerging-writemasking, while class B instruction templates support bothmerging- and zeroing-writemasking. When merging, vector masks allow anyset of elements in the destination to be protected from updates duringthe execution of any operation (specified by the base operation and theaugmentation operation); in other one embodiment, preserving the oldvalue of each element of the destination where the corresponding maskbit has a 0. In contrast, when zeroing vector masks allow any set ofelements in the destination to be zeroed during the execution of anyoperation (specified by the base operation and the augmentationoperation); in one embodiment, an element of the destination is set to 0when the corresponding mask bit has a 0 value. A subset of thisfunctionality is the ability to control the vector length of theoperation being performed (that is, the span of elements being modified,from the first to the last one); however, it is not necessary that theelements that are modified be consecutive. Thus, the write mask field1770 allows for partial vector operations, including loads, stores,arithmetic, logical, etc. While embodiments of the invention aredescribed in which the write mask field's 1770 content selects one of anumber of write mask registers that contains the write mask to be used(and thus the write mask field's 1770 content indirectly identifies thatmasking to be performed), alternative embodiments instead or additionalallow the mask write field's 1770 content to directly specify themasking to be performed.

Immediate field 1772—its content allows for the specification of animmediate. This field is optional in the sense that is it not present inan implementation of the generic vector friendly format that does notsupport immediate and it is not present in instructions that do not usean immediate.

Class field 1768—its content distinguishes between different classes ofinstructions. With reference to FIGS. 17A-B, the contents of this fieldselect between class A and class B instructions. In FIGS. 17A-B, roundedcorner squares are used to indicate a specific value is present in afield (e.g., class A 1768A and class B 1768B for the class field 1768respectively in FIGS. 17A-B).

Instruction Templates of Class A

In the case of the non-memory access 1705 instruction templates of classA, the alpha field 1752 is interpreted as an RS field 1752A, whosecontent distinguishes which one of the different augmentation operationtypes are to be performed (e.g., round 1752A.1 and data transform1752A.2 are respectively specified for the no memory access, round typeoperation 1710 and the no memory access, data transform type operation1715 instruction templates), while the beta field 1754 distinguisheswhich of the operations of the specified type is to be performed. In theno memory access 1705 instruction templates, the scale field 1760, thedisplacement field 1762A, and the displacement scale filed 1762B are notpresent.

No-Memory Access Instruction Templates—Full Round Control Type Operation

In the no memory access full round control type operation 1710instruction template, the beta field 1754 is interpreted as a roundcontrol field 1754A, whose content(s) provide static rounding. While inthe described embodiments of the invention the round control field 1754Aincludes a suppress all floating point exceptions (SAE) field 1756 and around operation control field 1758, alternative embodiments may supportmay encode both these concepts into the same field or only have one orthe other of these concepts/fields (e.g., may have only the roundoperation control field 1758).

SAE field 1756—its content distinguishes whether or not to disable theexception event reporting; when the SAE field's 1756 content indicatessuppression is enabled, a given instruction does not report any kind offloating-point exception flag and does not raise any floating pointexception handler.

Round operation control field 1758—its content distinguishes which oneof a group of rounding operations to perform (e.g., Round-up,Round-down, Round-towards-zero and Round-to-nearest). Thus, the roundoperation control field 1758 allows for the changing of the roundingmode on a per instruction basis. In one embodiment of the inventionwhere a processor includes a control register for specifying roundingmodes, the round operation control field's 1750 content overrides thatregister value.

No Memory Access Instruction Templates—Data Transform Type Operation

In the no memory access data transform type operation 1715 instructiontemplate, the beta field 1754 is interpreted as a data transform field1754B, whose content distinguishes which one of a number of datatransforms is to be performed (e.g., no data transform, swizzle,broadcast).

In the case of a memory access 1720 instruction template of class A, thealpha field 1752 is interpreted as an eviction hint field 1752B, whosecontent distinguishes which one of the eviction hints is to be used (inFIG. 17A, temporal 1752B.1 and non-temporal 1752B.2 are respectivelyspecified for the memory access, temporal 1725 instruction template andthe memory access, non-temporal 1730 instruction template), while thebeta field 1754 is interpreted as a data manipulation field 1754C, whosecontent distinguishes which one of a number of data manipulationoperations (also known as primitives) is to be performed (e.g., nomanipulation; broadcast; up conversion of a source; and down conversionof a destination). The memory access 1720 instruction templates includethe scale field 1760, and optionally the displacement field 1762A or thedisplacement scale field 1762B.

Vector memory instructions perform vector loads from and vector storesto memory, with conversion support. As with regular vector instructions,vector memory instructions transfer data from/to memory in a dataelement-wise fashion, with the elements that are actually transferred isdictated by the contents of the vector mask that is selected as thewrite mask.

Memory Access Instruction Templates—Temporal

Temporal data is data likely to be reused soon enough to benefit fromcaching. This is, however, a hint, and different processors mayimplement it in different ways, including ignoring the hint entirely.

Memory Access Instruction Templates—Non-Temporal

Non-temporal data is data unlikely to be reused soon enough to benefitfrom caching in the 1st-level cache and should be given priority foreviction. This is, however, a hint, and different processors mayimplement it in different ways, including ignoring the hint entirely.

Instruction Templates of Class B

In the case of the instruction templates of class B, the alpha field1752 is interpreted as a write mask control (Z) field 1752C, whosecontent distinguishes whether the write masking controlled by the writemask field 1770 should be a merging or a zeroing.

In the case of the non-memory access 1705 instruction templates of classB, part of the beta field 1754 is interpreted as an RL field 1757A,whose content distinguishes which one of the different augmentationoperation types are to be performed (e.g., round 1757A.1 and vectorlength (VSIZE) 1757A.2 are respectively specified for the no memoryaccess, write mask control, partial round control type operation 1712instruction template and the no memory access, write mask control, VSIZEtype operation 1717 instruction template), while the rest of the betafield 1754 distinguishes which of the operations of the specified typeis to be performed. In the no memory access 1705 instruction templates,the scale field 1760, the displacement field 1762A, and the displacementscale filed 1762B are not present.

In the no memory access, write mask control, partial round control typeoperation 1710 instruction template, the rest of the beta field 1754 isinterpreted as a round operation field 1759A and exception eventreporting is disabled (a given instruction does not report any kind offloating-point exception flag and does not raise any floating pointexception handler).

Round operation control field 1759A—just as round operation controlfield 1758, its content distinguishes which one of a group of roundingoperations to perform (e.g., Round-up, Round-down, Round-towards-zeroand Round-to-nearest). Thus, the round operation control field 1759Aallows for the changing of the rounding mode on a per instruction basis.In one embodiment of the invention where a processor includes a controlregister for specifying rounding modes, the round operation controlfield's 1750 content overrides that register value.

In the no memory access, write mask control, VSIZE type operation 1717instruction template, the rest of the beta field 1754 is interpreted asa vector length field 1759B, whose content distinguishes which one of anumber of data vector lengths is to be performed on (e.g., 128, 256, or512 byte).

In the case of a memory access 1720 instruction template of class B,part of the beta field 1754 is interpreted as a broadcast field 1757B,whose content distinguishes whether or not the broadcast type datamanipulation operation is to be performed, while the rest of the betafield 1754 is interpreted the vector length field 1759B. The memoryaccess 1720 instruction templates include the scale field 1760, andoptionally the displacement field 1762A or the displacement scale field1762B.

With regard to the generic vector friendly instruction format 1700, afull opcode field 1774 is shown including the format field 1740, thebase operation field 1742, and the data element width field 1764. Whileone embodiment is shown where the full opcode field 1774 includes all ofthese fields, the full opcode field 1774 includes less than all of thesefields in embodiments that do not support all of them. The full opcodefield 1774 provides the operation code (opcode).

The augmentation operation field 1750, the data element width field1764, and the write mask field 1770 allow these features to be specifiedon a per instruction basis in the generic vector friendly instructionformat.

The combination of write mask field and data element width field createtyped instructions in that they allow the mask to be applied based ondifferent data element widths.

The various instruction templates found within class A and class B arebeneficial in different situations. In some embodiments of theinvention, different processors or different cores within a processormay support only class A, only class B, or both classes. For instance, ahigh performance general purpose out-of-order core intended forgeneral-purpose computing may support only class B, a core intendedprimarily for graphics and/or scientific (throughput) computing maysupport only class A, and a core intended for both may support both (ofcourse, a core that has some mix of templates and instructions from bothclasses but not all templates and instructions from both classes iswithin the purview of the invention). Also, a single processor mayinclude multiple cores, all of which support the same class or in whichdifferent cores support different class. For instance, in a processorwith separate graphics and general purpose cores, one of the graphicscores intended primarily for graphics and/or scientific computing maysupport only class A, while one or more of the general purpose cores maybe high performance general purpose cores with out of order executionand register renaming intended for general-purpose computing thatsupport only class B. Another processor that does not have a separategraphics core, may include one more general purpose in-order orout-of-order cores that support both class A and class B. Of course,features from one class may also be implement in the other class indifferent embodiments of the invention. Programs written in a high levellanguage would be put (e.g., just in time compiled or staticallycompiled) into an variety of different executable forms, including: 1) aform having only instructions of the class(es) supported by the targetprocessor for execution; or 2) a form having alternative routineswritten using different combinations of the instructions of all classesand having control flow code that selects the routines to execute basedon the instructions supported by the processor which is currentlyexecuting the code.

Exemplary Specific Vector Friendly Instruction Format

FIG. 18A-18C are block diagrams illustrating an exemplary specificvector friendly instruction format according to embodiments of theinvention. FIG. 18A shows a specific vector friendly instruction format1800 that is specific in the sense that it specifies the location, size,interpretation, and order of the fields, as well as values for some ofthose fields. The specific vector friendly instruction format 1800 maybe used to extend the x86 instruction set, and thus some of the fieldsare similar or the same as those used in the existing x86 instructionset and extension thereof (e.g., AVX). This format remains consistentwith the prefix encoding field, real opcode byte field, MOD R/M field,SIB field, displacement field, and immediate fields of the existing x86instruction set with extensions. The fields from FIGS. 17A-17B intowhich the fields from FIGS. 18A-18C map are illustrated.

It should be understood that, although embodiments of the invention aredescribed with reference to the specific vector friendly instructionformat 1800 in the context of the generic vector friendly instructionformat 1700 for illustrative purposes, the invention is not limited tothe specific vector friendly instruction format 1800 except whereclaimed. For example, the generic vector friendly instruction format1700 contemplates a variety of possible sizes for the various fields,while the specific vector friendly instruction format 1800 is shown ashaving fields of specific sizes. By way of specific example, while thedata element width field 1764 is illustrated as a one bit field in thespecific vector friendly instruction format 1800, the invention is notso limited (that is, the generic vector friendly instruction format 1700contemplates other sizes of the data element width field 1764).

The generic vector friendly instruction format 1700 includes thefollowing fields listed below in the order illustrated in FIG. 18A.

EVEX Prefix (Bytes 0-3) 1802—is encoded in a four-byte form.

Format Field 1740 (EVEX Byte 0, bits [7:0])—the first byte (EVEX Byte 0)is the format field 1740 and it contains 0x62 (the unique value used fordistinguishing the vector friendly instruction format in one embodimentof the invention).

The second-fourth bytes (EVEX Bytes 1-3) include a number of bit fieldsproviding specific capability.

REX field 1805 (EVEX Byte 1, bits [7-5])—consists of a EVEX.R bit field(EVEX Byte 1, bit [7]-R), EVEX.X bit field (EVEX byte 1, bit [6]-X), andEVEX.B byte 1, bit[5]-B). The EVEX.R, EVEX.X, and EVEX.B bit fieldsprovide the same functionality as the corresponding VEX bit fields, andare encoded using is complement form, i.e. ZMM0 is encoded as 1111B,ZMM15 is encoded as 0000B. Other fields of the instructions encode thelower three bits of the register indexes as is known in the art (rrr,xxx, and bbb), so that Rrrr, Xxxx, and Bbbb may be formed by addingEVEX.R, EVEX.X, and EVEX.B.

REX′ field 1810—this is the first part of the REX′ field 1810 and is theEVEX.R′ bit field (EVEX Byte 1, bit [4]-R′) that is used to encodeeither the upper 16 or lower 16 of the extended 32 register set. In oneembodiment of the invention, this bit, along with others as indicatedbelow, is stored in bit inverted format to distinguish (in thewell-known x86 32-bit mode) from the BOUND instruction, whose realopcode byte is 62, but does not accept in the MOD R/M field (describedbelow) the value of 11 in the MOD field; alternative embodiments of theinvention do not store this and the other indicated bits below in theinverted format. A value of 1 is used to encode the lower 16 registers.In other words, R′Rrrr is formed by combining EVEX.R′, EVEX.R, and theother RRR from other fields.

Opcode map field 1815 (EVEX byte 1, bits [3:0]-mmmm)—its content encodesan implied leading opcode byte (0F, 0F 38, or 0F 3).

Data element width field 1764 (EVEX byte 2, bit [7]-W)—is represented bythe notation EVEX.W. EVEX.W is used to define the granularity (size) ofthe datatype (either 32-bit data elements or 64-bit data elements).

EVEX.vvvv 1820 (EVEX Byte 2, bits [6:3]-vvvv)—the role of EVEX.vvvv mayinclude the following: 1) EVEX.vvvv encodes the first source registeroperand, specified in inverted (1s complement) form and is valid forinstructions with 2 or more source operands; 2) EVEX.vvvv encodes thedestination register operand, specified in 1s complement form forcertain vector shifts; or 3) EVEX.vvvv does not encode any operand, thefield is reserved and should contain 1111b. Thus, EVEX.vvvv field 1820encodes the 4 low-order bits of the first source register specifierstored in inverted (1s complement) form. Depending on the instruction,an extra different EVEX bit field is used to extend the specifier sizeto 32 registers.

EVEX.U 1768 Class field (EVEX byte 2, bit [2]-U)—If EVEX.U=0, itindicates class A or EVEX.U0; if EVEX.U=1, it indicates class B orEVEX.U1.

Prefix encoding field 1825 (EVEX byte 2, bits [1:0]-pp)—providesadditional bits for the base operation field. In addition to providingsupport for the legacy SSE instructions in the EVEX prefix format, thisalso has the benefit of compacting the SIMD prefix (rather thanrequiring a byte to express the SIMD prefix, the EVEX prefix requiresonly 2 bits). In one embodiment, to support legacy SSE instructions thatuse a SIMD prefix (66H, F2H, F3H) in both the legacy format and in theEVEX prefix format, these legacy SIMD prefixes are encoded into the SIMDprefix encoding field; and at runtime are expanded into the legacy SIMDprefix prior to being provided to the decoder's PLA (so the PLA canexecute both the legacy and EVEX format of these legacy instructionswithout modification). Although newer instructions could use the EVEXprefix encoding field's content directly as an opcode extension, certainembodiments expand in a similar fashion for consistency but allow fordifferent meanings to be specified by these legacy SIMD prefixes. Analternative embodiment may redesign the PLA to support the 2 bit SIMDprefix encodings, and thus not require the expansion.

Alpha field 1752 (EVEX byte 3, bit [7]-EH; also known as EVEX.EH,EVEX.rs, EVEX.RL, EVEX.write mask control, and EVEX.N; also illustratedwith a)—as previously described, this field is context specific.

Beta field 1754 (EVEX byte 3, bits [6:4]-SSS, also known as EVEX.s₂₋₀,EVEX.r₂₋₀, EVEX.rrl, EVEX.LL0, EVEX.LLB; also illustrated with βββ)—aspreviously described, this field is context specific.

REX′ field 1810—this is the remainder of the REX′ field and is theEVEX.V′ bit field (EVEX Byte 3, bit [3]-V′) that may be used to encodeeither the upper 16 or lower 16 of the extended 32 register set. Thisbit is stored in bit inverted format. A value of 1 is used to encode thelower 16 registers. In other words, V′VVVV is formed by combiningEVEX.V′, EVEX.vvvv.

Write mask field 1770 (EVEX byte 3, bits [2:0]-kkk)—its contentspecifies the index of a register in the write mask registers aspreviously described. In one embodiment of the invention, the specificvalue EVEX kkk=000 has a special behavior implying no write mask is usedfor the particular instruction (this may be implemented in a variety ofways including the use of a write mask hardwired to all ones or hardwarethat bypasses the masking hardware).

Real Opcode Field 1830 (Byte 4) is also known as the opcode byte. Partof the opcode is specified in this field.

MOD R/M Field 1840 (Byte 5) includes MOD field 1842, Reg field 1844, andR/M field 1846. As previously described, the MOD field's 1842 contentdistinguishes between memory access and non-memory access operations.The role of Reg field 1844 can be summarized to two situations: encodingeither the destination register operand or a source register operand, orbe treated as an opcode extension and not used to encode any instructionoperand. The role of R/M field 1846 may include the following: encodingthe instruction operand that references a memory address, or encodingeither the destination register operand or a source register operand.

Scale, Index, Base (SIB) Byte (Byte 6)—As previously described, thescale field's 1850 content is used for memory address generation.SIB.xxx 1854 and SIB.bbb 1856—the contents of these fields have beenpreviously referred to with regard to the register indexes Xxxx andBbbb.

Displacement field 1762A (Bytes 7-10)—when MOD field 1842 contains 10,bytes 7-10 are the displacement field 1762A, and it works the same asthe legacy 32-bit displacement (disp32) and works at byte granularity.

Displacement factor field 1762B (Byte 7)—when MOD field 1842 contains01, byte 7 is the displacement factor field 1762B. The location of thisfield is that same as that of the legacy x86 instruction set 8-bitdisplacement (disp8), which works at byte granularity. Since disp8 issign extended, it can only address between −128 and 127 bytes offsets;in terms of 64 byte cache lines, disp8 uses 8 bits that can be set toonly four really useful values −128, −64, 0, and 64; since a greaterrange is often needed, disp32 is used; however, disp32 requires 4 bytes.In contrast to disp8 and disp32, the displacement factor field 1762B isa reinterpretation of disp8; when using displacement factor field 1762B,the actual displacement is determined by the content of the displacementfactor field multiplied by the size of the memory operand access (N).This type of displacement is referred to as disp8*N. This reduces theaverage instruction length (a single byte of used for the displacementbut with a much greater range). Such compressed displacement is based onthe assumption that the effective displacement is multiple of thegranularity of the memory access, and hence, the redundant low-orderbits of the address offset do not need to be encoded. In other words,the displacement factor field 1762B substitutes the legacy x86instruction set 8-bit displacement. Thus, the displacement factor field1762B is encoded the same way as an x86 instruction set 8-bitdisplacement (so no changes in the ModRM/SIB encoding rules) with theonly exception that disp8 is overloaded to disp8*N. In other words,there are no changes in the encoding rules or encoding lengths but onlyin the interpretation of the displacement value by hardware (which needsto scale the displacement by the size of the memory operand to obtain abyte-wise address offset). Immediate field 1772 operates as previouslydescribed.

Full Opcode Field

FIG. 18B is a block diagram illustrating the fields of the specificvector friendly instruction format 1800 that make up the full opcodefield 1774 according to one embodiment of the invention. Specifically,the full opcode field 1774 includes the format field 1740, the baseoperation field 1742, and the data element width (W) field 1764. Thebase operation field 1742 includes the prefix encoding field 1825, theopcode map field 1815, and the real opcode field 1830.

Register Index Field

FIG. 18C is a block diagram illustrating the fields of the specificvector friendly instruction format 1800 that make up the register indexfield 1744 according to one embodiment of the invention. Specifically,the register index field 1744 includes the REX field 1805, the REX′field 1810, the MODR/M.reg field 1844, the MODR/M.r/m field 1846, theVVVV field 1820, xxx field 1854, and the bbb field 1856.

Augmentation Operation Field

FIG. 18D is a block diagram illustrating the fields of the specificvector friendly instruction format 1800 that make up the augmentationoperation field 1750 according to one embodiment of the invention. Whenthe class (U) field 1768 contains 0, it signifies EVEX.U0 (class A1768A); when it contains 1, it signifies EVEX.U1 (class B 1768B). WhenU=0 and the MOD field 1842 contains 11 (signifying a no memory accessoperation), the alpha field 1752 (EVEX byte 3, bit [7]-EH) isinterpreted as the rs field 1752A. When the rs field 1752A contains a 1(round 1752A.1), the beta field 1754 (EVEX byte 3, bits [6:4]-SSS) isinterpreted as the round control field 1754A. The round control field1754A includes a one bit SAE field 1756 and a two bit round operationfield 1758. When the rs field 1752A contains a 0 (data transform1752A.2), the beta field 1754 (EVEX byte 3, bits [6:4]-SSS) isinterpreted as a three bit data transform field 1754B. When U=0 and theMOD field 1842 contains 00, 01, or 10 (signifying a memory accessoperation), the alpha field 1752 (EVEX byte 3, bit [7]-EH) isinterpreted as the eviction hint (EH) field 1752B and the beta field1754 (EVEX byte 3, bits [6:4]-SSS) is interpreted as a three bit datamanipulation field 1754C.

When U=1, the alpha field 1752 (EVEX byte 3, bit [7]-EH) is interpretedas the write mask control (Z) field 1752C. When U=1 and the MOD field1842 contains 11 (signifying a no memory access operation), part of thebeta field 1754 (EVEX byte 3, bit [4]-S₀) is interpreted as the RL field1757A; when it contains a 1 (round 1757A.1) the rest of the beta field1754 (EVEX byte 3, bit [6-5]-S₂₋₁) is interpreted as the round operationfield 1759A, while when the RL field 1757A contains a 0 (VSIZE 1757.A2)the rest of the beta field 1754 (EVEX byte 3, bit [6-5]-S₂₋₁) isinterpreted as the vector length field 1759B (EVEX byte 3, bit[6-5]-L₁₋₀). When U=1 and the MOD field 1842 contains 00, 01, or 10(signifying a memory access operation), the beta field 1754 (EVEX byte3, bits [6:4]-SSS) is interpreted as the vector length field 1759B (EVEXbyte 3, bit [6-5]-L₁₋₀) and the broadcast field 1757B (EVEX byte 3, bit[4]-B).

Exemplary Register Architecture

FIG. 19 is a block diagram of a register architecture 1900 according toone embodiment of the invention. In the embodiment illustrated, thereare 32 vector registers 1910 that are 512 bits wide; these registers arereferenced as zmm0 through zmm31. The lower order 256 bits of the lower16 zmm registers are overlaid on registers ymm0-16. The lower order 128bits of the lower 16 zmm registers (the lower order 128 bits of the ymmregisters) are overlaid on registers xmm0-15. The specific vectorfriendly instruction format 1800 operates on these overlaid registerfile as illustrated in the below tables.

Adjustable Vector Length Class Operations Registers InstructionTemplates A (FIG. 1710, 1715, zmm registers that do not include the 17A;1725, 1730 (the vector length vector length field 1759B U = 0) is 64byte) B (FIG. 1712 zmm registers 17B; (the vector length U = 1) is 64byte) Instruction templates B (FIG. 1717, 1727 zmm, ymm, or xmm that doinclude the vector 17B; registers (the vector length field 1759B U = 1)length is 64 byte, 32 byte, or 16 byte) depending on the vector lengthfield 1759B

In other words, the vector length field 1759B selects between a maximumlength and one or more other shorter lengths, where each such shorterlength is half the length of the preceding length; and instructionstemplates without the vector length field 1759B operate on the maximumvector length. Further, in one embodiment, the class B instructiontemplates of the specific vector friendly instruction format 1800operate on packed or scalar single/double-precision floating point dataand packed or scalar integer data. Scalar operations are operationsperformed on the lowest order data element position in an zmm/ymm/xmmregister; the higher order data element positions are either left thesame as they were prior to the instruction or zeroed depending on theembodiment.

Write mask registers 1915—in the embodiment illustrated, there are 8write mask registers (k0 through k7), each 64 bits in size. In analternate embodiment, the write mask registers 1915 are 16 bits in size.As previously described, in one embodiment of the invention, the vectormask register k0 cannot be used as a write mask; when the encoding thatwould normally indicate k0 is used for a write mask, it selects ahardwired write mask of 0xFFFF, effectively disabling write masking forthat instruction.

General-purpose registers 1925—in the embodiment illustrated, there aresixteen 64-bit general-purpose registers that are used along with theexisting x86 addressing modes to address memory operands. Theseregisters are referenced by the names RAX, RBX, RCX, RDX, RBP, RSI, RDI,RSP, and R8 through R15.

Scalar floating point stack register file (x87 stack) 1945, on which isaliased the MMX packed integer flat register file 1950—in the embodimentillustrated, the x87 stack is an eight-element stack used to performscalar floating-point operations on 32/64/80-bit floating point datausing the x87 instruction set extension; while the MMX registers areused to perform operations on 64-bit packed integer data, as well as tohold operands for some operations performed between the MMX and XMMregisters.

Alternative embodiments of the invention may use wider or narrowerregisters. Additionally, alternative embodiments of the invention mayuse more, less, or different register files and registers.

Exemplary Core Architectures, Processors, and Computer Architectures

Processor cores may be implemented in different ways, for differentpurposes, and in different processors. For instance, implementations ofsuch cores may include: 1) a general purpose in-order core intended forgeneral-purpose computing; 2) a high performance general purposeout-of-order core intended for general-purpose computing; 3) a specialpurpose core intended primarily for graphics and/or scientific(throughput) computing. Implementations of different processors mayinclude: 1) a CPU including one or more general purpose in-order coresintended for general-purpose computing and/or one or more generalpurpose out-of-order cores intended for general-purpose computing; and2) a coprocessor including one or more special purpose cores intendedprimarily for graphics and/or scientific (throughput). Such differentprocessors lead to different computer system architectures, which mayinclude: 1) the coprocessor on a separate chip from the CPU; 2) thecoprocessor on a separate die in the same package as a CPU; 3) thecoprocessor on the same die as a CPU (in which case, such a coprocessoris sometimes referred to as special purpose logic, such as integratedgraphics and/or scientific (throughput) logic, or as special purposecores); and 4) a system on a chip that may include on the same die thedescribed CPU (sometimes referred to as the application core(s) orapplication processor(s)), the above described coprocessor, andadditional functionality. Exemplary core architectures are describednext, followed by descriptions of exemplary processors and computerarchitectures.

Exemplary Core Architectures

In-Order and Out-of-Order Core Block Diagram

FIG. 20A is a block diagram illustrating both an exemplary in-orderpipeline and an exemplary register renaming, out-of-orderissue/execution pipeline according to embodiments of the invention. FIG.20B is a block diagram illustrating both an exemplary embodiment of anin-order architecture core and an exemplary register renaming,out-of-order issue/execution architecture core to be included in aprocessor according to embodiments of the invention. The solid linedboxes in FIGS. 20A-B illustrate the in-order pipeline and in-order core,while the optional addition of the dashed lined boxes illustrates theregister renaming, out-of-order issue/execution pipeline and core. Giventhat the in-order aspect is a subset of the out-of-order aspect, theout-of-order aspect will be described.

In FIG. 20A, a processor pipeline 2000 includes a fetch stage 2002, alength decode stage 2004, a decode stage 2006, an allocation stage 2008,a renaming stage 2010, a scheduling (also known as a dispatch or issue)stage 2012, a register read/memory read stage 2014, an execute stage2016, a write back/memory write stage 2018, an exception handling stage2022, and a commit stage 2024.

FIG. 20B shows processor core 2090 including a front end unit 2030coupled to an execution engine unit 2050, and both are coupled to amemory unit 2070. The core 2090 may be a reduced instruction setcomputing (RISC) core, a complex instruction set computing (CISC) core,a very long instruction word (VLIW) core, or a hybrid or alternativecore type. As yet another option, the core 2090 may be a special-purposecore, such as, for example, a network or communication core, compressionengine, coprocessor core, general purpose computing graphics processingunit (GPGPU) core, graphics core, or the like.

The front end unit 2030 includes a branch prediction unit 2032 coupledto an instruction cache unit 2034, which is coupled to an instructiontranslation lookaside buffer (TLB) 2036, which is coupled to aninstruction fetch unit 2038, which is coupled to a decode unit 2040. Thedecode unit 2040 (or decoder) may decode instructions, and generate asan output one or more micro-operations, micro-code entry points,microinstructions, other instructions, or other control signals, whichare decoded from, or which otherwise reflect, or are derived from, theoriginal instructions. The decode unit 2040 may be implemented usingvarious different mechanisms. Examples of suitable mechanisms include,but are not limited to, look-up tables, hardware implementations,programmable logic arrays (PLAs), microcode read only memories (ROMs),etc. In one embodiment, the core 2090 includes a microcode ROM or othermedium that stores microcode for certain macroinstructions (e.g., indecode unit 2040 or otherwise within the front end unit 2030). Thedecode unit 2040 is coupled to a rename/allocator unit 2052 in theexecution engine unit 2050.

The execution engine unit 2050 includes the rename/allocator unit 2052coupled to a retirement unit 2054 and a set of one or more schedulerunit(s) 2056. The scheduler unit(s) 2056 represents any number ofdifferent schedulers, including reservations stations, centralinstruction window, etc. The scheduler unit(s) 2056 is coupled to thephysical register file(s) unit(s) 2058. Each of the physical registerfile(s) units 2058 represents one or more physical register files,different ones of which store one or more different data types, such asscalar integer, scalar floating point, packed integer, packed floatingpoint, vector integer, vector floating point, status (e.g., aninstruction pointer that is the address of the next instruction to beexecuted), etc. In one embodiment, the physical register file(s) unit2058 comprises a vector registers unit, a write mask registers unit, anda scalar registers unit. These register units may provide architecturalvector registers, vector mask registers, and general purpose registers.The physical register file(s) unit(s) 2058 is overlapped by theretirement unit 2054 to illustrate various ways in which registerrenaming and out-of-order execution may be implemented (e.g., using areorder buffer(s) and a retirement register file(s); using a futurefile(s), a history buffer(s), and a retirement register file(s); using aregister maps and a pool of registers; etc.). The retirement unit 2054and the physical register file(s) unit(s) 2058 are coupled to theexecution cluster(s) 2060. The execution cluster(s) 2060 includes a setof one or more execution units 2062 and a set of one or more memoryaccess units 2064. The execution units 2062 may perform variousoperations (e.g., shifts, addition, subtraction, multiplication) and onvarious types of data (e.g., scalar floating point, packed integer,packed floating point, vector integer, vector floating point). Whilesome embodiments may include a number of execution units dedicated tospecific functions or sets of functions, other embodiments may includeonly one execution unit or multiple execution units that all perform allfunctions. The scheduler unit(s) 2056, physical register file(s) unit(s)2058, and execution cluster(s) 2060 are shown as being possibly pluralbecause certain embodiments create separate pipelines for certain typesof data/operations (e.g., a scalar integer pipeline, a scalar floatingpoint/packed integer/packed floating point/vector integer/vectorfloating point pipeline, and/or a memory access pipeline that each havetheir own scheduler unit, physical register file(s) unit, and/orexecution cluster—and in the case of a separate memory access pipeline,certain embodiments are implemented in which only the execution clusterof this pipeline has the memory access unit(s) 2064). It should also beunderstood that where separate pipelines are used, one or more of thesepipelines may be out-of-order issue/execution and the rest in-order.

The set of memory access units 2064 is coupled to the memory unit 2070,which includes a data TLB unit 2072 coupled to a data cache unit 2074coupled to a level 2 (L2) cache unit 2076. In one exemplary embodiment,the memory access units 2064 may include a load unit, a store addressunit, and a store data unit, each of which is coupled to the data TLBunit 2072 in the memory unit 2070. The instruction cache unit 2034 isfurther coupled to a level 2 (L2) cache unit 2076 in the memory unit2070. The L2 cache unit 2076 is coupled to one or more other levels ofcache and eventually to a main memory.

By way of example, the exemplary register renaming, out-of-orderissue/execution core architecture may implement the pipeline 2000 asfollows: 1) the instruction fetch 2038 performs the fetch and lengthdecoding stages 2002 and 2004; 2) the decode unit 2040 performs thedecode stage 2006; 3) the rename/allocator unit 2052 performs theallocation stage 2008 and renaming stage 2010; 4) the scheduler unit(s)2056 performs the schedule stage 2012; 5) the physical register file(s)unit(s) 2058 and the memory unit 2070 perform the register read/memoryread stage 2014; the execution cluster 2060 perform the execute stage2016; 6) the memory unit 2070 and the physical register file(s) unit(s)2058 perform the write back/memory write stage 2018; 7) various unitsmay be involved in the exception handling stage 2022; and 8) theretirement unit 2054 and the physical register file(s) unit(s) 2058perform the commit stage 2024.

The core 2090 may support one or more instructions sets (e.g., the x86instruction set (with some extensions that have been added with newerversions); the MIPS instruction set of MIPS Technologies of Sunnyvale,Calif.; the ARM instruction set (with optional additional extensionssuch as NEON) of ARM Holdings of Sunnyvale, Calif.), including theinstruction(s) described herein. In one embodiment, the core 2090includes logic to support a packed data instruction set extension (e.g.,AVX1, AVX2), thereby allowing the operations used by many multimediaapplications to be performed using packed data.

It should be understood that the core may support multithreading(executing two or more parallel sets of operations or threads), and maydo so in a variety of ways including time sliced multithreading,simultaneous multithreading (where a single physical core provides alogical core for each of the threads that physical core issimultaneously multithreading), or a combination thereof (e.g., timesliced fetching and decoding and simultaneous multithreading thereaftersuch as in the Intel® Hyperthreading technology).

While register renaming is described in the context of out-of-orderexecution, it should be understood that register renaming may be used inan in-order architecture. While the illustrated embodiment of theprocessor also includes separate instruction and data cache units2034/2074 and a shared L2 cache unit 2076, alternative embodiments mayhave a single internal cache for both instructions and data, such as,for example, a Level 1 (L1) internal cache, or multiple levels ofinternal cache. In some embodiments, the system may include acombination of an internal cache and an external cache that is externalto the core and/or the processor. Alternatively, all of the cache may beexternal to the core and/or the processor.

Specific Exemplary In-Order Core Architecture

FIGS. 21A-B illustrate a block diagram of a more specific exemplaryin-order core architecture, which core would be one of several logicblocks (including other cores of the same type and/or different types)in a chip. The logic blocks communicate through a high-bandwidthinterconnect network (e.g., a ring network) with some fixed functionlogic, memory I/O interfaces, and other necessary I/O logic, dependingon the application.

FIG. 21A is a block diagram of a single processor core, along with itsconnection to the on-die interconnect network 2102 and with its localsubset of the Level 2 (L2) cache 2104, according to embodiments of theinvention. In one embodiment, an instruction decoder 2100 supports thex86 instruction set with a packed data instruction set extension. An L1cache 2106 allows low-latency accesses to cache memory into the scalarand vector units. While in one embodiment (to simplify the design), ascalar unit 2108 and a vector unit 2110 use separate register sets(respectively, scalar registers 2112 and vector registers 2114) and datatransferred between them is written to memory and then read back in froma level 1 (L1) cache 2106, alternative embodiments of the invention mayuse a different approach (e.g., use a single register set or include acommunication path that allow data to be transferred between the tworegister files without being written and read back).

The local subset of the L2 cache 2104 is part of a global L2 cache thatis divided into separate local subsets, one per processor core. Eachprocessor core has a direct access path to its own local subset of theL2 cache 2104. Data read by a processor core is stored in its L2 cachesubset 2104 and can be accessed quickly, in parallel with otherprocessor cores accessing their own local L2 cache subsets. Data writtenby a processor core is stored in its own L2 cache subset 2104 and isflushed from other subsets, if necessary. The ring network ensurescoherency for shared data. The ring network is bi-directional to allowagents such as processor cores, L2 caches and other logic blocks tocommunicate with each other within the chip. Each ring data-path is1012-bits wide per direction.

FIG. 21B is an expanded view of part of the processor core in FIG. 21Aaccording to embodiments of the invention. FIG. 21B includes an L1 datacache 2106A part of the L1 cache 2104, as well as more detail regardingthe vector unit 2110 and the vector registers 2114. Specifically, thevector unit 2110 is a 16-wide vector processing unit (VPU) (see the16-wide ALU 2128), which executes one or more of integer,single-precision float, and double-precision float instructions. The VPUsupports swizzling the register inputs with swizzle unit 2120, numericconversion with numeric convert units 2122A-B, and replication withreplication unit 2124 on the memory input. Write mask registers 2126allow predicating resulting vector writes.

FIG. 22 is a block diagram of a processor 2200 that may have more thanone core, may have an integrated memory controller, and may haveintegrated graphics according to embodiments of the invention. The solidlined boxes in FIG. 22 illustrate a processor 2200 with a single core2202A, a system agent 2210, a set of one or more bus controller units2216, while the optional addition of the dashed lined boxes illustratesan alternative processor 2200 with multiple cores 2202A-N, a set of oneor more integrated memory controller unit(s) 2214 in the system agentunit 2210, and special purpose logic 2208.

Thus, different implementations of the processor 2200 may include: 1) aCPU with the special purpose logic 2208 being integrated graphics and/orscientific (throughput) logic (which may include one or more cores), andthe cores 2202A-N being one or more general purpose cores (e.g., generalpurpose in-order cores, general purpose out-of-order cores, acombination of the two); 2) a coprocessor with the cores 2202A-N being alarge number of special purpose cores intended primarily for graphicsand/or scientific (throughput); and 3) a coprocessor with the cores2202A-N being a large number of general purpose in-order cores. Thus,the processor 2200 may be a general-purpose processor, coprocessor orspecial-purpose processor, such as, for example, a network orcommunication processor, compression engine, graphics processor, GPGPU(general purpose graphics processing unit), a high-throughput manyintegrated core (MIC) coprocessor (including 30 or more cores), embeddedprocessor, or the like. The processor may be implemented on one or morechips. The processor 2200 may be a part of and/or may be implemented onone or more substrates using any of a number of process technologies,such as, for example, BiCMOS, CMOS, or NMOS.

The memory hierarchy includes one or more levels of cache within thecores, a set or one or more shared cache units 2206, and external memory(not shown) coupled to the set of integrated memory controller units2214. The set of shared cache units 2206 may include one or moremid-level caches, such as level 2 (L2), level 3 (L3), level 4 (L4), orother levels of cache, a last level cache (LLC), and/or combinationsthereof. While in one embodiment a ring based interconnect unit 2212interconnects the integrated graphics logic 2208, the set of sharedcache units 2206, and the system agent unit 2210/integrated memorycontroller unit(s) 2214, alternative embodiments may use any number ofwell-known techniques for interconnecting such units. In one embodiment,coherency is maintained between one or more cache units 2206 and cores2202-A-N.

In some embodiments, one or more of the cores 2202A-N are capable ofmulti-threading. The system agent 2210 includes those componentscoordinating and operating cores 2202A-N. The system agent unit 2210 mayinclude for example a power control unit (PCU) and a display unit. ThePCU may be or include logic and components needed for regulating thepower state of the cores 2202A-N and the integrated graphics logic 2208.The display unit is for driving one or more externally connecteddisplays.

The cores 2202A-N may be homogenous or heterogeneous in terms ofarchitecture instruction set; that is, two or more of the cores 2202A-Nmay be capable of execution the same instruction set, while others maybe capable of executing only a subset of that instruction set or adifferent instruction set.

Exemplary Computer Architectures

FIGS. 23-24 are block diagrams of exemplary computer architectures.Other system designs and configurations known in the arts for laptops,desktops, handheld PCs, personal digital assistants, engineeringworkstations, servers, network devices, network hubs, switches, embeddedprocessors, digital signal processors (DSPs), graphics devices, videogame devices, set-top boxes, micro controllers, cell phones, portablemedia players, hand held devices, and various other electronic devices,are also suitable. In general, a huge variety of systems or electronicdevices capable of incorporating a processor and/or other executionlogic as disclosed herein are generally suitable.

Referring now to FIG. 23, shown is a block diagram of a system 2300 inaccordance with one embodiment of the present invention. The system 2300may include one or more processors 2310, 2315, which are coupled to acontroller hub 2320. In one embodiment the controller hub 2320 includesa graphics memory controller hub (GMCH) 2390 and an Input/Output Hub(IOH) 2350 (which may be on separate chips); the GMCH 2390 includesmemory and graphics controllers to which are coupled memory 2340 and acoprocessor 2345; the IOH 2350 is couples input/output (I/O) devices2360 to the GMCH 2390. Alternatively, one or both of the memory andgraphics controllers are integrated within the processor (as describedherein), the memory 2340 and the coprocessor 2345 are coupled directlyto the processor 2310, and the controller hub 2320 in a single chip withthe IOH 2350.

The optional nature of additional processors 2315 is denoted in FIG. 23with broken lines. Each processor 2310, 2315 may include one or more ofthe processing cores described herein and may be some version of theprocessor 2200.

The memory 2340 may be, for example, dynamic random access memory(DRAM), phase change memory (PCM), or a combination of the two. For atleast one embodiment, the controller hub 2320 communicates with theprocessor(s) 2310, 2315 via a multi-drop bus, such as a frontside bus(FSB), point-to-point interface such as QuickPath Interconnect (QPI), orsimilar connection 2395.

In one embodiment, the coprocessor 2345 is a special-purpose processor,such as, for example, a high-throughput MIC processor, a network orcommunication processor, compression engine, graphics processor, GPGPU,embedded processor, or the like. In one embodiment, controller hub 2320may include an integrated graphics accelerator.

There can be a variety of differences between the physical resources2310, 2315 in terms of a spectrum of metrics of merit includingarchitectural, microarchitectural, thermal, power consumptioncharacteristics, and the like.

In one embodiment, the processor 2310 executes instructions that controldata processing operations of a general type. Embedded within theinstructions may be coprocessor instructions. The processor 2310recognizes these coprocessor instructions as being of a type that shouldbe executed by the attached coprocessor 2345. Accordingly, the processor2310 issues these coprocessor instructions (or control signalsrepresenting coprocessor instructions) on a coprocessor bus or otherinterconnect, to coprocessor 2345. Coprocessor(s) 2345 accept andexecute the received coprocessor instructions.

Referring now to FIG. 24, shown is a block diagram of a SoC 2400 inaccordance with an embodiment of the present invention. Similar elementsin FIG. 22 bear like reference numerals. Also, dashed lined boxes areoptional features on more advanced SoCs. In FIG. 24, an interconnectunit(s) 2402 is coupled to: an application processor 2410 which includesa set of one or more cores 202A-N and shared cache unit(s) 2206; asystem agent unit 2210; a bus controller unit(s) 2216; an integratedmemory controller unit(s) 2214; a set or one or more coprocessors 2420which may include integrated graphics logic, an image processor, anaudio processor, and a video processor; an static random access memory(SRAM) unit 2430; a direct memory access (DMA) unit 2432; and a displayunit 2440 for coupling to one or more external displays. In oneembodiment, the coprocessor(s) 2420 include a special-purpose processor,such as, for example, a network or communication processor, compressionengine, GPGPU, a high-throughput MIC processor, embedded processor, orthe like.

Embodiments of the mechanisms disclosed herein may be implemented inhardware, software, firmware, or a combination of such implementationapproaches. Embodiments of the invention may be implemented as computerprograms or program code executing on programmable systems comprising atleast one processor, a storage system (including volatile andnon-volatile memory and/or storage elements), at least one input device,and at least one output device.

Program code may be applied to input instructions to perform thefunctions described herein and generate output information. The outputinformation may be applied to one or more output devices, in knownfashion. For purposes of this application, a processing system includesany system that has a processor, such as, for example; a digital signalprocessor (DSP), a microcontroller, an application specific integratedcircuit (ASIC), or a microprocessor.

The program code may be implemented in a high level procedural or objectoriented programming language to communicate with a processing system.The program code may also be implemented in assembly or machinelanguage, if desired. In fact, the mechanisms described herein are notlimited in scope to any particular programming language. In any case,the language may be a compiled or interpreted language.

One or more aspects of at least one embodiment may be implemented byrepresentative instructions stored on a machine-readable medium whichrepresents various logic within the processor, which when read by amachine causes the machine to fabricate logic to perform the techniquesdescribed herein. Such representations, known as “IP cores” may bestored on a tangible, machine readable medium and supplied to variouscustomers or manufacturing facilities to load into the fabricationmachines that actually make the logic or processor.

Such machine-readable storage media may include, without limitation,non-transitory, tangible arrangements of articles manufactured or formedby a machine or device, including storage media such as hard disks, anyother type of disk including floppy disks, optical disks, compact diskread-only memories (CD-ROMs), compact disk rewritable's (CD-RWs), andmagneto-optical disks, semiconductor devices such as read-only memories(ROMs), random access memories (RAMs) such as dynamic random accessmemories (DRAMs), static random access memories (SRAMs), erasableprogrammable read-only memories (EPROMs), flash memories, electricallyerasable programmable read-only memories (EEPROMs), phase change memory(PCM), magnetic or optical cards, or any other type of media suitablefor storing electronic instructions.

Accordingly, embodiments of the invention also include non-transitory,tangible machine-readable media containing instructions or containingdesign data, such as Hardware Description Language (HDL), which definesstructures, circuits, apparatuses, processors and/or system featuresdescribed herein. Such embodiments may also be referred to as programproducts.

Emulation (Including Binary Translation, Code Morphing, Etc.)

In some cases, an instruction converter may be used to convert aninstruction from a source instruction set to a target instruction set.For example, the instruction converter may translate (e.g., using staticbinary translation, dynamic binary translation including dynamiccompilation), morph, emulate, or otherwise convert an instruction to oneor more other instructions to be processed by the core. The instructionconverter may be implemented in software, hardware, firmware, or acombination thereof. The instruction converter may be on processor, offprocessor, or part on and part off processor.

FIG. 25 is a block diagram contrasting the use of a software instructionconverter to convert binary instructions in a source instruction set tobinary instructions in a target instruction set according to embodimentsof the invention. In the illustrated embodiment, the instructionconverter is a software instruction converter, although alternativelythe instruction converter may be implemented in software, firmware,hardware, or various combinations thereof. FIG. 25 shows a program in ahigh level language 2502 may be compiled using an x86 compiler 2504 togenerate x86 binary code 2506 that may be natively executed by aprocessor with at least one x86 instruction set core 2516. The processorwith at least one x86 instruction set core 2516 represents any processorthat can perform substantially the same functions as an Intel processorwith at least one x86 instruction set core by compatibly executing orotherwise processing (1) a substantial portion of the instruction set ofthe Intel x86 instruction set core or (2) object code versions ofapplications or other software targeted to run on an Intel processorwith at least one x86 instruction set core, in order to achievesubstantially the same result as an Intel processor with at least onex86 instruction set core. The x86 compiler 2504 represents a compilerthat is operable to generate x86 binary code 2506 (e.g., object code)that can, with or without additional linkage processing, be executed onthe processor with at least one x86 instruction set core 2516.Similarly, FIG. 25 shows the program in the high level language 2502 maybe compiled using an alternative instruction set compiler 2508 togenerate alternative instruction set binary code 2510 that may benatively executed by a processor without at least one x86 instructionset core 2514 (e.g., a processor with cores that execute the MIPSinstruction set of MIPS Technologies of Sunnyvale, Calif. and/or thatexecute the ARM instruction set of ARM Holdings of Sunnyvale, Calif.).The instruction converter 2512 is used to convert the x86 binary code2506 into code that may be natively executed by the processor without anx86 instruction set core 2514. This converted code is not likely to bethe same as the alternative instruction set binary code 2510 because aninstruction converter capable of this is difficult to make; however, theconverted code will accomplish the general operation and be made up ofinstructions from the alternative instruction set. Thus, the instructionconverter 2512 represents software, firmware, hardware, or a combinationthereof that, through emulation, simulation or any other process, allowsa processor or other electronic device that does not have an x86instruction set processor or core to execute the x86 binary code 2506.

Power State Demotion in a Processor

Referring now to FIG. 26, shown is a block diagram of a system 2600 inaccordance with one or more embodiments. In some embodiments, the system2600 may be all or a portion of an electronic device or component. Forexample, the system 2600 may be a cellular telephone, a computer, aserver, a network device, a system on a chip (SoC), a controller, awireless transceiver, a power supply unit, etc. Furthermore, in someembodiments, the system 2600 may be part of a grouping of related orinterconnected devices, such as a datacenter, a computing cluster, etc.

As shown in FIG. 26, the system 2600 may include a processor 2610operatively coupled to system memory 2605 and a power supply 2650.Further, although not shown in FIG. 26, the system 2600 may includeother components. In one or more embodiments, the system memory 2605 canbe implemented with any type(s) of computer memory (e.g., dynamicrandom-access memory (DRAM), static random-access memory (SRAM),non-volatile memory (NVM), a combination of DRAM and NVM, etc.). Thepower supply 2650 may provide electrical power to the processor 2610.

In one or more embodiments, the processor 2610 may be a hardwareprocessing device (e.g., a central processing unit (CPU), a System on aChip (SoC), and so forth). As shown, the processor 2610 can include anynumber of processing engines 2620A-2620N (also referred to herein as“processing engines 2620” or “cores 2620”), a power control unit 2630,and a configuration storage 2640. Each processing engine 2620 canexecute software instructions.

In one or more embodiments, the power control unit 2630 may be ahardware unit of the processor 2610 to control the power states of theprocessing engines 2620. For example, the power control unit 2630 maycontrol operating frequencies, voltage levels, and so forth. Theconfiguration storage 2640 may include data used by the power controlunit 2630 to control power states.

As shown, the power control unit 2630 may include demotion logic 2635.In some embodiments, the demotion logic 2635 may perform single-coredemotion (SCD) and multi-core demotion (MCD) for the processing engines2620A-2620N. For example, the demotion logic 2635 may demote a corebased on the average number of break events in that core. In anotherexample, the demotion logic 2635 may demote one or more cores based atleast in part on the sum of average numbers of break events acrossmultiple cores. In one or more embodiments, a demoted core will notenter a deeper idle state (e.g., C3) in response to a request (e.g.,from the OS), and instead will remain in a shallower idle state (e.g.,C1).

In one or more embodiments, the demotion logic 2635 may performsingle-core un-demotion (SCUD) and multi-core un-demotion (MCUD) for theprocessing engines 2620A-2620N. For example, the demotion logic 2635 maydetermine that the conditions that caused a single-core demotion are nolonger present in a core, and in response may causing the core to exitthe single-core demotion mode.

In some embodiments, the demotion logic 2635 may use configuration datastored in the configuration storage 2640, such as single-core demotionthresholds, multi-core demotion thresholds, and so forth. Further, insome embodiments, the demotion logic 2635 may be implemented at least inpart in hardware (e.g., circuitry). Various aspects of the demotionlogic 2635 are described below with reference to FIGS. 27-32.

Referring to FIG. 27, shown is a diagram of an example operation 2700,in accordance with one or more embodiments. Assume that the exampleoperation 2700 may be performed by components of a processor. Forexample, the components shown in FIG. 27 may correspond generally tosimilar components of the processor 2610 described above with referenceto FIG. 26. In some embodiments, all or a part of the operation 2700 maybe performed using the demotion logic 2635 (shown in FIG. 26).

As shown in FIG. 27, the operation 2700 may include determining corecounts 2720A-2720N corresponding to multiple cores 2710A-2710N. In someembodiments, each core count 2720 may indicate the number of breakevents occurring in a particular core 2710. As used herein, the term“break event” may refer to an exit from an idle power state to an activepower state. For example, the core count 2720A may indicate the numberof instances of exits from one of C7, C6, C3 and C1 states into a C0state. In some embodiments, the core counts 2720A-2720N may beimplemented in hardware counters of cores 2710A-2710N that areincremented in response to break events. In some embodiments, the corecounts 2720A-2720N may count break events occurring in a defined timewindow or period.

As shown in FIG. 27, the core counts 2720A-2720N may be used todetermine core averages 2730A-2730N (corresponding to the cores2710A-2710N). In one or more embodiments, each core average 2730 may becalculated as the moving average of the corresponding core count 2720over a defined time window (e.g., 30 milliseconds). As such, each coreaverage 2730 may be a core-level metric reflecting the level of breakevent bursts in a particular core. In some embodiments, the coreaverages 2730A-2730N may be used as inputs to initiate the single-coredemotions 2750A-2750N of cores 2710A-2710N. For example, if it isdetermined that the core average 2730A exceeds an SCD thresholdassociated with core 2710A, the single-core demotion 2750A of core 2710Amay be performed. As such, core 2710A will not enter a deeper idle statein response to a request, and instead will be in a shallower idle state.

In one or more embodiments, the core averages 2730A-2730N may be summedto generate the processor metric 2740. As such, the processor metric2740 may reflect the level of break event bursts across an entireprocessor (i.e., for all of the cores 2710A-2710N). Note that, whileFIG. 27 shows an example embodiment of generating the processor metric2740, other implementations are possible. For example, in otherembodiments, the processor metric 2740 may be generated by summing thecore counts 2720A-2720N, and then calculating a moving average of thissum (also referred to as a “rolling average”) across a given timeperiod.

In one or more embodiments, the processor metric 2740 and the coreaverages 2730A-2730N may be used as inputs to initiate the multi-coredemotions 2760A-2760N of cores 2710A-2710N. For example, the multi-coredemotion 2760A of core 2710A may be performed in response to adetermination that the processor metric 2740 exceeds a core MCDthreshold and the core average 2730A exceeds a processor MCD threshold.

Referring now to FIG. 28, shown is a diagram of an example storage 2800in accordance with one or more embodiments. The storage 2800 maycorrespond generally to all or a part of the configuration storage 2640(shown in FIG. 26). The storage 2800 may be implemented at least in partin hardware of a processor (e.g., volatile memory, non-volatile memory,etc.).

As shown, the storage 2800 may store a core-specific data set 2805 for aparticular core in a processor. Note that, while FIG. 28 only shows onedata set 2805 for the sake of clarity, it is contemplated that thestorage 2800 may store multiple data sets 2805 corresponding to multiplecores in a processor. In some embodiments, the core-specific data set2805 may include a threshold for single-core demotion (SCD) 2810, a corethreshold for multi-core demotion (MCD) 2820, a processor threshold forMCD 2830, a threshold for single-core un-demotion (SCUD) 2840, a corethreshold for multi-core un-demotion (MCUD) 2850, a processor thresholdfor MCUD 2860, and a demotion type 2870. In one or more embodiments, ademotion control unit in a processor (e.g., demotion logic 2635 shown inFIG. 26) may use the core-specific data set 2805 to perform demotion andun-demotion of cores. When a core is demoted, the demotion control unitmay update the demotion type 2870 to indicate that the type of demotion(i.e., SCD or MCD).

In some embodiments, the core-specific data set 2805 may be received viaone or more interfaces. For example, some or all of the data elements2810-2870 may be received via a mailbox interface, a machine specificregister, and/or a memory mapped input/output storage. Further, some orall of the data elements 2810-2870 may be received from software such asan operating system, a basic input/output system, and so forth. Forexample, such data may be received in an operating system control hintvia an Energy-Performance Preference (EPP) control, an energyperformance bias model-specific register (MSR), and so forth. In someembodiments, some or all of the data elements 2810-2870 may be receivedperiodically according to a defined time interval (e.g., every 1millisecond).

Referring now to FIG. 29, shown is a flow diagram of a method 2900 fordemotion, in accordance with one or more embodiments. In variousembodiments, the method 2900 may be performed by processing logic thatmay include hardware (e.g., processing device, circuitry, dedicatedlogic, programmable logic, microcode, etc.), software (e.g.,instructions run on a processing device), or a combination thereof. Insome implementations, the method 2900 may be performed using one or morecomponents shown in FIGS. 26-28 (e.g., power control unit 2630, demotionlogic 2635, core-specific data set 2805, and so forth). In firmware orsoftware embodiments, the method 2900 may be implemented by computerexecuted instructions stored in a non-transitory machine readablemedium, such as an optical, semiconductor, or magnetic storage device.The machine-readable medium may store data, which if used by at leastone machine, causes the at least one machine to fabricate at least oneintegrated circuit to perform a method. For the sake of illustration,the actions involved in the method 2900 may be described below withreference to FIGS. 26-28, which show examples in accordance with one ormore embodiments. However, the scope of the various embodimentsdiscussed herein is not limited in this regard.

Block 2910 may include counting break events each core in a processor.For example, referring to FIG. 27, each core 2710 may include a counterto keep the core count 2720. In some embodiments, the core count 2720may indicate the number of exits from an idle power state to an activepower state that have occurred in the corresponding core 2710. Forexample, the core count 2720 may be incremented for each instance of atransition from one of C7, C6, C3 and C1 states into a C0 state.

Block 2920 may include determining an average of the break event countfor each core. For example, referring to FIGS. 26-27, the demotion logic2635 may calculate the core average 2730 for each core 2710 as therolling average of the core count 2720 over a defined time window.

Block 2930 may include determining a sum of the core averages for allcores in the processor. For example, referring to FIGS. 26-27, thedemotion logic 2635 may sum the core averages 2730A-2730N to generatethe processor metric 2740.

Block 2940 may include determining single-core demotion (SCD) andmulti-core demotion (MCD) thresholds for each core. For example,referring to FIGS. 26-28, the demotion logic 2635 may determine, foreach core 2710, the threshold for SCD 2810, the core threshold for MCD2820, and the processor threshold for MCD 2830.

As shown, FIG. 29 includes a dotted line 2945 after block 2940. Note,for the sake of clarity in FIG. 27, the portion of method 2900 below thedotted line 2945 (i.e., blocks/diamonds 2950-2990) is shown in asimplified form corresponding to a particular core. However, understandthat the portion below dotted line 2945 may be repeated for each core ina processor. For example, although not shown in FIG. 27, blocks/diamonds2950-2990 may be performed in parallel or in series for each core in aprocessor.

Diamond 2950 may include determining whether the core average for aparticular core exceeds the SCD threshold associated with that core. Forexample, referring to FIGS. 26-28, the demotion logic 2635 may determinewhether the core average 2730A exceeds an SCD threshold 2810 associatedwith core 2710A.

If it is determined at diamond 2950 that the core average for theparticular core exceeds the associated SCD threshold, then at block2980, a power state demotion of the particular core may be performed.Further, at block 2990, an indication of the demotion type performed forthe particular core (i.e., SCD demotion) may be stored. Furthermore, atblock 2995, the operating frequency of the particular core may beincreased. For example, referring to FIGS. 26-28, the demotion logic2635 may perform or cause a demotion of core 2710A in response to adetermination that the core average 2730A exceeds the SCD threshold 2810associated with core 2710A. In some embodiments, the demotion logic 2635may update the demotion type 2870 in storage 2800 to indicate that anSCD demotion was performed for core 2710A (i.e., in response toexceeding the SCD threshold). Further, in some embodiments, the demotionlogic 2635 may increase the operating frequency provided to the core2710A.

However, if it is determined at diamond 2950 that the core average forthe particular core does not exceed the associated SCD threshold, thenat diamond 2960, a determination is made regarding whether the sum ofcore averages exceeds the processor MCD threshold associated with thatcore. For example, referring to FIGS. 26-28, the demotion logic 2635 maydetermine whether the processor metric 2740 exceeds the processorthreshold for MCD 2830 associated with core 2710N.

If it is determined at diamond 2960 that the sum of core averages doesnot exceed the processor MCD threshold associated with the particularcore, then the method 2900 may return to block 2910 to continue countingbreak events. However, if it is determined at diamond 2960 that the sumof core averages exceeds the processor MCD threshold associated with theparticular core, then at diamond 2970, a determination is made regardingwhether the core average for the particular core exceeds the core MCDthreshold associated with that core. For example, referring to FIGS.26-28, the demotion logic 2635 may determine whether the core average2730N exceeds the core threshold for MCD 2820 associated with core2710N.

If it is determined at diamond 2970 that the core average for theparticular core does not exceed the core MCD threshold 2960, then themethod 2900 may return to block 2910 to continue counting break events.However, if it is determined at diamond 2970 that the core average forthe particular core exceeds the core MCD threshold, then at block 2980,a power state demotion of the particular core may be performed. Further,at block 2990, an indication of the demotion type performed for theparticular core (i.e., MCD demotion) may be stored. Furthermore, atblock 2995, the operating frequency of the particular core may beincreased. For example, referring to FIGS. 26-28, the demotion logic2635 may perform or cause a demotion of core 2710N in response to adetermination that core average 2730N exceeds the core threshold for MCD2820. In some embodiments, the demotion logic 2635 may update thedemotion type 2870 in storage 2800 to indicate that an MCD demotion wasperformed for core 2710N. Further, in some embodiments, the demotionlogic 2635 may increase the operating frequency provided to the core2710N. In some embodiments, after block 2995, the method 2900 may becompleted.

Note that, while FIG. 29 shows an example method 2900, embodiments arenot limited in this regard. It is contemplated that some block/diamondsshown in FIG. 29 could be performed in a different order, could beomitted, and so forth. For example, block 2990 and/or block 2995 may beomitted in some embodiments. In another example, while FIG. 29 showsdiamond 2960 as preceding diamond 2970, it is contemplated that diamond2970 could precede diamond 2960. In yet another example, while FIG. 29shows diamonds 2960 and 2970 as being separate determinations, thesedeterminations could also be referred to and/or performed as a singledetermination. For example, the positive determinations in diamonds 2960and 2970 may be referred to herein as “a determination that the sum ofcore averages exceeds the processor MCD threshold and the core averageexceeds the core MCD threshold.”

In one or more embodiments, the core MCD threshold may be specified tobe lower than the SCD threshold. Further, the processor MCD thresholdmay be specified to be higher than the SCD threshold. For example,referring to FIG. 28, each core-specific data set 2805 may be generatedto include an SCD threshold 2810 that is higher than the core thresholdfor MCD 2820, and a processor threshold for MCD 2830 that is higher thanthe SCD threshold 2810. In some embodiments, the relative thresholdsizes in the core-specific data set 2805 may allow MCD to be usedconcurrently with SCD while addressing different conditions in thecores.

In some embodiments, the core MCUD threshold may be specified to belower than the SCUD threshold. Further, the processor MCUD threshold maybe specified to be higher than the SCUD threshold. For example,referring to FIG. 28, each core-specific data set 2805 may be generatedto include an SCUD threshold 2840 that is higher than the core thresholdfor MCUD 2850, and a processor threshold for MCD 2860 that is higherthan the SCD threshold 2840.

Referring now to FIG. 30, shown is a flow diagram of a method 3000 forun-demotion, in accordance with one or more embodiments. In variousembodiments, the method 3000 may be performed by processing logic thatmay include hardware (e.g., processing device, circuitry, dedicatedlogic, programmable logic, microcode, etc.), software (e.g.,instructions run on a processing device), or a combination thereof. Insome implementations, the method 3000 may be performed using one or morecomponents shown in FIGS. 26-28 (e.g., power control unit 2630, demotionlogic 2635, core-specific data set 2805, and so forth). In firmware orsoftware embodiments, the method 3000 may be implemented by computerexecuted instructions stored in a non-transitory machine readablemedium, such as an optical, semiconductor, or magnetic storage device.The machine-readable medium may store data, which if used by at leastone machine, causes the at least one machine to fabricate at least oneintegrated circuit to perform a method. For the sake of illustration,the actions involved in the method 3000 may be described below withreference to FIGS. 26-28, which show examples in accordance with one ormore embodiments. However, the scope of the various embodimentsdiscussed herein is not limited in this regard.

Block 3010 may include counting break events for a demoted core (e.g., acore previously demoted using method 2900). For example, referring toFIG. 27, the core count 2720A may be incremented to count the breakevents occurring in a demoted core 2710A.

Block 3020 may include determining an average of the break event countfor the demoted core. For example, referring to FIGS. 26-27, thedemotion logic 2635 may calculate the core average 2730A for demotedcore 2710A as the rolling average of the core count 2720A over a definedtime window.

Block 3030 may include determining a sum of the core averages for allcores in the processor. For example, referring to FIGS. 26-27, thedemotion logic 2635 may sum the core averages 2730A-2730N to generatethe processor metric 2740.

Block 3040 may include determining single-core un-demotion (SCUD) andmulti-core un-demotion (MCUD) thresholds for each core. For example,referring to FIGS. 26-28, the demotion logic 2635 may determine, foreach core 2710, the threshold for SCUD 2840, the core threshold for MCUD2850, and the processor threshold for MCUD 2860.

Diamond 3050 may include determining the demotion type (i.e.,single-core demotion (SCD) or multi-core demotion (MCD)) associated withthe demoted core. For example, referring to FIGS. 26-28, the demotionlogic 2635 may read the demotion type 2870 from core-specific data set2805 associated with the demoted core 2710A.

If it is determined at diamond 3050 that the demotion type is SCD, thenat diamond 3060, a determination may be made regarding whether the coreaverage for the demoted core is below the SCUD threshold associated withthat core. For example, referring to FIGS. 26-28, the demotion logic2635 may determine whether the core average 2730A is below the SCUDthreshold 2840 associated with the demoted core 2710A.

If it is determined at diamond 3060 that the core average for thedemoted core is not below the SCUD threshold, then the method 3000 mayreturn to block 3010 to continue counting break events. However, if itis determined at diamond 3060 that the core average for the demoted coreis below the SCUD threshold, then at block 3070, an un-demotion may beperformed for the demoted core. For example, referring to FIGS. 26-28,the demotion logic 2635 may perform or cause an un-demotion of demotedcore 2710A in response to a determination that the core average 2730A isbelow the SCUD threshold 2840 associated with core 2710A. Further, insome embodiments, the demotion logic 2635 may clear or reset thedemotion type 2870 field associated with core 2710A. In someembodiments, the demotion logic 2635 may reduce the operating frequencyprovided to the core 2710A.

However, if it is determined at diamond 3050 that the demotion type isMCD, then at diamond 3080, a determination may be made regarding whetherthe sum of core averages is below the processor MCUD thresholdassociated with the demoted core. For example, referring to FIGS. 26-28,the demotion logic 2635 may determine whether the processor metric 2740is below the processor threshold for MCUD 2860 associated with demotedcore 2710N.

If it is determined at diamond 3080 that the sum of core averages isbelow the processor MCUD threshold associated with the demoted core,then at block 3070, an un-demotion may be performed for the demotedcore. For example, referring to FIGS. 26-28, the demotion logic 2635 mayperform or cause an un-demotion of demoted core 2710N in response to adetermination that the processor metric 2740 is below the processorthreshold for MCUD 2860. In some embodiments, the demotion logic 2635may clear or reset the demotion type 2870 field associated with core2710N. Further, in some embodiments, the demotion logic 2635 may reducethe operating frequency provided to the core 2710A.

However, if it is determined at diamond 3080 that the sum of coreaverages is not below the processor MCUD threshold associated with thedemoted core, then at diamond 3090, a determination may be maderegarding whether the core average for the demoted core is below thecore MCUD threshold associated with the demoted core. For example,referring to FIGS. 26-28, the demotion logic 2635 may determine whetherthe core average 2730N is below the core threshold for MCUD 2850associated with the demoted core 2710N.

If it is determined at diamond 3090 that the core average for thedemoted core is not below the core MCUD threshold, then the method 3000may return to block 3010 to continue counting break events. However, ifit is determined at 3090 that the core average for the demoted core isbelow the core MCUD threshold, then at block 3070, an un-demotion may beperformed for the demoted core. For example, referring to FIGS. 26-28,the demotion logic 2635 may perform or cause an un-demotion of demotedcore 2710N in response to a determination that the core average 2730N isbelow the core threshold for MCUD 2850 associated with core 2710N. Insome embodiments, the demotion logic 2635 may clear or reset thedemotion type 2870 field associated with core 2710N. After block 3090,the method 3000 may be completed. Note that, while FIG. 30 shows anexample method 3000, embodiments are not limited in this regard. Forexample, while FIG. 30 shows diamond 3080 as preceding diamond 3090, itis contemplated that diamond 3090 could precede diamond 3080, could beperformed in parallel, and so forth.

Referring now to FIG. 31, shown is a flow diagram of a method 3100 fordemotion, in accordance with one or more embodiments. In variousembodiments, the method 3100 may be performed by processing logic thatmay include hardware (e.g., processing device, circuitry, dedicatedlogic, programmable logic, microcode, etc.), software (e.g.,instructions run on a processing device), or a combination thereof. Insome implementations, the method 3100 may be performed using one or morecomponents shown in FIGS. 26-28 (e.g., power control unit 2630, demotionlogic 2635, core-specific data set 2805, and so forth). In firmware orsoftware embodiments, the method 3100 may be implemented by computerexecuted instructions stored in a non-transitory machine readablemedium, such as an optical, semiconductor, or magnetic storage device.The machine-readable medium may store data, which if used by at leastone machine, causes the at least one machine to fabricate at least oneintegrated circuit to perform a method. For the sake of illustration,the actions involved in the method 3100 may be described below withreference to FIGS. 26-28, which show examples in accordance with one ormore embodiments. However, the scope of the various embodimentsdiscussed herein is not limited in this regard.

Block 3110 may include, for each core in a plurality of cores of aprocessor, determining an average count of power state break events inthe core. For example, referring to FIG. 27, the core counts 2720A-2720Nmay be determined for the cores 2710A-2710N.

Block 3120 may include determining a sum of the average counts of theplurality of cores. For example, referring to FIGS. 26-27, the demotionlogic 2635 may calculate the core averages 2730A-2730N for the cores2710A-2710N, and sum the core averages 2730A-2730N to generate theprocessor metric 2740.

Block 3130 may include determining whether the average count of a firstcore exceeds a first demotion threshold. In some embodiments, the firstthreshold may be a core threshold for multi-core demotion (MCD). Forexample, referring to FIGS. 26-28, the demotion logic 2635 may determinewhether the core average 2730N exceeds the core threshold for MCD 2820associated with core 2710N.

Block 3140 may include determining whether the sum of the average countsof the plurality of cores exceeds a second demotion threshold. In someembodiments, the second threshold may be a processor threshold for MCD.For example, referring to FIGS. 26-28, the demotion logic 2635 maydetermine whether the processor metric 2740 exceeds the processorthreshold for MCD 2830 associated with core 2710N.

Block 3150 may include, in response to a determination that the averagecount of the first core exceeds the first demotion threshold and the sumof the average counts exceeds the second demotion threshold, performinga power state demotion of the first core. For example, referring toFIGS. 26-28, the demotion logic 2635 may perform or cause a multi-coredemotion of core 2710N in response to a determination that the coreaverage 2730N exceeds the core threshold for MCD 2820 (block 3130) andthat the processor metric 2740 exceeds the processor threshold for MCD2830 (block 3140). After block 3150, the method 3100 may be completed.

Referring now to FIG. 32, shown is a flow diagram of a method 3200 fordemotion, in accordance with one or more embodiments. In variousembodiments, the method 3200 may be performed by processing logic thatmay include hardware (e.g., processing device, circuitry, dedicatedlogic, programmable logic, microcode, etc.), software (e.g.,instructions run on a processing device), or a combination thereof. Insome implementations, the method 3200 may be performed using one or morecomponents shown in FIGS. 26-28 (e.g., power control unit 2630, demotionlogic 2635, core-specific data set 2805, and so forth). In firmware orsoftware embodiments, the method 3200 may be implemented by computerexecuted instructions stored in a non-transitory machine readablemedium, such as an optical, semiconductor, or magnetic storage device.The machine-readable medium may store data, which if used by at leastone machine, causes the at least one machine to fabricate at least oneintegrated circuit to perform a method. For the sake of illustration,the actions involved in the method 3200 may be described below withreference to FIGS. 26-28, which show examples in accordance with one ormore embodiments. However, the scope of the various embodimentsdiscussed herein is not limited in this regard.

Block 3210 may include determining a plurality of core-level powermetrics for a plurality of cores in a processor. For example, referringto FIG. 27, the core counts 2720A-2720N and the core averages2730A-2730N may be determined for the cores 2710A-2710N.

Block 3220 may include determining a processor-level power metric basedon the plurality of core-level power metrics. For example, referring toFIGS. 26-27, the demotion logic 2635 may sum or otherwise combine thecore counts 2720A-2720N and/or the core averages 2730A-2730N to generatethe processor metric 2740.

Block 3230 may include determining whether a first core-level powermetric exceeds a first threshold associated with a first core. In someembodiments, the first threshold may be a core threshold for multi-coredemotion (MCD). For example, referring to FIGS. 26-28, the demotionlogic 2635 may determine whether the core average 2730N exceeds the corethreshold for MCD 2820 associated with core 2710N.

Block 3240 may include determining whether the processor-level powermetric exceeds a second threshold. In some embodiments, the secondthreshold may be a processor threshold for MCD. For example, referringto FIGS. 26-28, the demotion logic 2635 may determine whether theprocessor metric 2740 exceeds the processor threshold for MCD 2830associated with core 2710N.

Block 3250 may include, in response to a determination that the firstcore-level power metric exceeds the first threshold and theprocessor-level power metric exceeds the second threshold, performing apower state demotion of the first core. For example, referring to FIGS.26-28, the demotion logic 2635 may perform or cause a multi-coredemotion of core 2710N in response to a determination that the coreaverage 2730N exceeds the core threshold for MCD 2820 and that theprocessor metric 2740 exceeds the processor threshold for MCD 2830.After block 3250, the method 3200 may be completed.

The following clauses and/or examples pertain to further embodiments.

In Example 1, a processor for demotion includes a plurality of cores toexecute instructions and a demotion control circuit. The demotioncontrol circuit is to: for each core of the plurality of cores,determine an average count of power state break events in the core;determine a sum of the average counts of the plurality of cores;determine whether the average count of a first core exceeds a firstdemotion threshold; determine whether the sum of the average counts ofthe plurality of cores exceeds a second demotion threshold; and inresponse to a determination that the average count of the first coreexceeds the first demotion threshold and the sum of the average countsexceeds the second demotion threshold, perform a power state demotion ofthe first core.

In Example 2, the subject matter of Example 1 may optionally includethat the power state demotion is a multi-core demotion (MCD) of thefirst core; the first demotion threshold is a core threshold for MCD;and the second demotion threshold is a processor threshold for MCD.

In Example 3, the subject matter of Examples 1-2 may optionally includethat the demotion control circuit is to: determine whether the averagecount of a second core exceeds a single-core demotion (SCD) threshold;and in response to a determination that the average count of the secondcore exceeds the SCD threshold, perform a single-core demotion of thesecond core.

In Example 4, the subject matter of Examples 1-3 may optionally includethat the SCD threshold is specified to be higher than the core thresholdfor MCD; and the processor threshold for MCD is specified to be higherthan the SCD threshold.

In Example 5, the subject matter of Examples 1-4 may optionally includethat the demotion control circuit is to, subsequent to the single-coredemotion of the second core: in response to a determination that theaverage count of the second core is below a single-core un-demotion(SCUD) threshold, perform an un-demotion of the second core.

In Example 6, the subject matter of Examples 1-5 may optionally includethat the demotion control circuit is to, subsequent to the multi-coredemotion of the first core: in response to a determination that theaverage count of the first core is below a multi-core un-demotion (MCUD)threshold, perform an un-demotion of the first core.

In Example 7, the subject matter of Examples 1-6 may optionally includethat the demotion control circuit is to: in response to thedetermination that the average count of the first core exceeds the firstdemotion threshold and the sum of the average counts exceeds the seconddemotion threshold, increase an operating frequency of the first core.

In Example 8, the subject matter of Examples 1-7 may optionally includethat the demotion control circuit is to: increment a count of instancesof power state break events in the first core; and determine the averagecount in the first core as a moving average of the count over a definedtime window.

In Example 9, a method for demotion may include: for each core in aplurality of cores of a processor, determining an average count of breakevents in the core; determining a sum of the average counts of theplurality of cores; determining whether the average count of a firstcore exceeds a first threshold; determining whether the sum of theaverage counts of the plurality of cores exceeds a second threshold; andin response to a determination that the average count of the first coreexceeds the first threshold and the sum of the average counts exceedsthe second threshold, performing a multi-core demotion of the firstcore.

In Example 10, the subject matter of Example 9 may optionally include:determining whether the average count of a second core exceeds asingle-core demotion (SCD) threshold; and in response to a determinationthat the average count of the second core exceeds the SCD threshold,performing a single-core demotion of the second core, where the firstthreshold is a core threshold for MCD, and where the second demotionthreshold is a processor threshold for MCD.

In Example 11, the subject matter of Examples 9-10 may optionallyinclude, after performing the single-core demotion of the second core:determining whether the average count of the second core is below asingle-core un-demotion (SCUD) threshold; and in response to adetermination that the average count of the second core is below theSCUD threshold, performing an un-demotion of the second core.

In Example 12, the subject matter of Examples 9-11 may optionallyinclude, in response to the determination that the average count of thefirst core exceeds the first threshold and the sum of the average countsexceeds the second threshold: increasing an operating frequency of thefirst core; and storing, in a configuration storage of the processor, ademotion type indicator indicating that the first core was demoted viamulti-core demotion.

In Example 13, the subject matter of Examples 9-12 may optionallyinclude, after performing the multi-core demotion of the first core:determining, based on the demotion type indicator, that the first coreis in multi-core demotion mode; in response to a determination that thefirst core is in multi-core demotion mode, determining whether the sumof the average counts of the plurality of cores is below a processorthreshold for multi-core un-demotion (MCUD); and in response to adetermination that the sum of the average counts of the plurality ofcores is below the processor threshold for MCUD, performing anun-demotion of the first core.

In Example 14, the subject matter of Examples 9-13 may optionallyinclude, for each core in a plurality of cores, periodically obtainingthe first threshold and the second threshold using a defined timeinterval.

In Example 15, the subject matter of Examples 9-14 may optionallyinclude that determining the average count of break events in a corecomprises: incrementing a hardware counter to store a count of breakevents in the core; and determining the average count as a movingaverage of the count of break events over a defined time window.

In Example 16, a computing device for demotion includes: one or moreprocessors; and a memory having stored therein a plurality ofinstructions that when executed by the one or more processors, cause thecomputing device to perform the method of any of Examples 9 to 15.

In Example 17, at least one machine-readable medium having storedthereon data which, if used by at least one machine, causes the at leastone machine to perform the method of any of claims 9 to 16.

In Example 18, an electronic device for demotion, comprising means forperforming the method of any of claims 9 to 15.

In Example 19, a system for demotion includes a processor, and a systemmemory coupled to the processor. The processor includes a plurality ofcores to execute instructions and a demotion control circuit. Thedemotion control circuit is to: determine a plurality of core-levelpower metrics for the plurality of cores, the plurality of core-levelpower metrics comprising a first core-level power metric for a firstcore; determine a processor-level power metric based on the plurality ofcore-level power metrics; and in response to a determination that thefirst core-level power metric exceeds a first threshold and theprocessor-level power metric exceeds a second threshold, performing apower state demotion of the first core; and

In Example 20, the subject matter of Example 19 may optionally includethat the demotion control circuit is to, in response to thedetermination that the first core-level power metric exceeds the firstthreshold and the processor-level power metric exceeds the secondthreshold, increase an operating frequency of the first core.

In Example 21, the subject matter of Examples 19-20 may optionallyinclude that the demotion control circuit is to, in response to adetermination that a second core-level power metric associated with asecond core exceeds a third threshold, perform a single-core demotion ofthe second core.

In Example 22, the subject matter of Examples 19-21 may optionallyinclude that the demotion control circuit is to: in response to thedetermination that the second core-level power metric exceeds the thirdthreshold, storing, in a configuration storage of the processor, ademotion type indicator indicating that the second core was demoted viasingle-core demotion.

In Example 23, the subject matter of Examples 19-22 may optionallyinclude that the first threshold and the second threshold are associatedwith the first core, and that the first threshold and the secondthreshold are periodically updated by an operating system.

In Example 24, an apparatus for demotion includes: means fordetermining, for each core in a plurality of cores of a processor, anaverage count of break events in the core; means for determining a sumof the average counts of the plurality of cores; means for determiningwhether the average count of a first core exceeds a first threshold;means for determining whether the sum of the average counts of theplurality of cores exceeds a second threshold; and means for, inresponse to a determination that the average count of the first coreexceeds the first threshold and the sum of the average counts exceedsthe second threshold, performing a multi-core demotion of the firstcore.

In Example 25, the subject matter of Example 24 may optionally include:means for determining whether the average count of a second core exceedsa single-core demotion (SCD) threshold; and means for, in response to adetermination that the average count of the second core exceeds the SCDthreshold, performing a single-core demotion of the second core, wherethe first threshold is a core threshold for MCD, and where the seconddemotion threshold is a processor threshold for MCD.

In Example 26, the subject matter of Examples 24-25 may optionallyinclude means for, after performing the single-core demotion of thesecond core: determining whether the average count of the second core isbelow a single-core un-demotion (SCUD) threshold; and in response to adetermination that the average count of the second core is below theSCUD threshold, performing an un-demotion of the second core.

In Example 27, the subject matter of Examples 24-26 may optionallyinclude means for, in response to the determination that the averagecount of the first core exceeds the first threshold and the sum of theaverage counts exceeds the second threshold: increasing an operatingfrequency of the first core; and storing, in a configuration storage ofthe processor, a demotion type indicator indicating that the first corewas demoted via multi-core demotion.

In Example 28, the subject matter of Examples 24-27 may optionallyinclude means for, after performing the multi-core demotion of the firstcore: determining, based on the demotion type indicator, that the firstcore is in multi-core demotion mode; in response to a determination thatthe first core is in multi-core demotion mode, determining whether thesum of the average counts of the plurality of cores is below a processorthreshold for multi-core un-demotion (MCUD); and in response to adetermination that the sum of the average counts of the plurality ofcores is below the processor threshold for MCUD, performing anun-demotion of the first core.

In Example 29, the subject matter of Examples 24-28 may optionallyinclude means for, periodically obtaining, for each core in a pluralityof cores, the first threshold and the second threshold using a definedtime interval.

In Example 30, the subject matter of Examples 24-29 may optionallyinclude that the means for determining the average count of break eventsin a core comprises: means for incrementing a hardware counter to storea count of break events in the core; and means for determining theaverage count as a moving average of the count of break events over adefined time window.

In accordance with some embodiments, examples are provided forperforming demotion in a processor. In one or more embodiments, aprocessor may include logic to perform single-core demotion andmulti-core demotion. Using single-core demotion and multi-core demotionmay allow selection of power states based on core conditions andprocessor conditions. For example, multi-core demotion may allowefficient processing of threads that are migrated between cores. Inanother example, multi-core demotion may improve processing ofproducer/consumer work that is divided across multiple cores.Accordingly, one or more embodiments may provide improved flexibilityand/or granularity in controlling power states, and may thus providereduced power consumption.

Note that, while FIGS. 26-32 illustrate various example implementations,other variations are possible. For example, it is contemplated that oneor more embodiments may be implemented in the example devices andsystems described with reference to FIGS. 1-25.

Note that the examples shown in FIGS. 1-32 are provided for the sake ofillustration, and are not intended to limit any embodiments.Specifically, while embodiments may be shown in simplified form for thesake of clarity, embodiments may include any number and/or arrangementof processors, cores, and/or additional components (e.g., buses, storagemedia, connectors, power components, buffers, interfaces, etc.). Forexample, it is contemplated that some embodiments may include any numberof components in addition to those shown, and that different arrangementof the components shown may occur in certain implementations.Furthermore, it is contemplated that specifics in the examples shown inFIGS. 1-32 may be used anywhere in one or more embodiments.

Understand that various combinations of the above examples are possible.Embodiments may be used in many different types of systems. For example,in one embodiment a communication device can be arranged to perform thevarious methods and techniques described herein. Of course, the scope ofthe present invention is not limited to a communication device, andinstead other embodiments can be directed to other types of apparatusfor processing instructions, or one or more machine readable mediaincluding instructions that in response to being executed on a computingdevice, cause the device to carry out one or more of the methods andtechniques described herein.

References throughout this specification to “one embodiment” or “anembodiment” mean that a particular feature, structure, or characteristicdescribed in connection with the embodiment is included in at least oneimplementation encompassed within the present invention. Thus,appearances of the phrase “one embodiment” or “in an embodiment” are notnecessarily referring to the same embodiment. Furthermore, theparticular features, structures, or characteristics may be instituted inother suitable forms other than the particular embodiment illustratedand all such forms may be encompassed within the claims of the presentapplication.

While the present invention has been described with respect to a limitednumber of embodiments, those skilled in the art will appreciate numerousmodifications and variations therefrom. It is intended that the appendedclaims cover all such modifications and variations as fall within thetrue spirit and scope of this present invention.

What is claimed is:
 1. A processor comprising: a plurality of cores toexecute instructions; and demotion control logic to: for each core ofthe plurality of cores, determine an average count of power state breakevents in the core; determine a sum of the average counts of theplurality of cores; determine whether the average count of a first coreexceeds a first demotion threshold; determine whether the sum of theaverage counts of the plurality of cores exceeds a second demotionthreshold; and in response to a determination that the average count ofthe first core exceeds the first demotion threshold and the sum of theaverage counts exceeds the second demotion threshold, cause the firstcore to operate in a first mode, wherein operating in the first modecomprises overruling requests to reduce a power state of the first core.2. The processor of claim 1, wherein: the first mode is caused by amulti-core demotion (MCD) of the first core; the first demotionthreshold is a core threshold for MCD; and the second demotion thresholdis a processor threshold for MCD.
 3. The processor of claim 2, thedemotion control logic to: determine whether the average count of asecond core exceeds a single-core demotion (SCD) threshold; and inresponse to a determination that the average count of the second coreexceeds the SCD threshold, cause the second core to operate in a secondmode, wherein operating in the second mode comprises overruling requeststo reduce a power state of the second core.
 4. The processor of claim 3,wherein: the SCD threshold is specified to be higher than the corethreshold for MCD; and the processor threshold for MCD is specified tobe higher than the SCD threshold.
 5. The processor of claim 3, thedemotion control logic to, subsequent to causing the second core tooperate in the second mode: in response to a determination that theaverage count of the second core is below a single-core un-demotion(SCUD) threshold, cause the second core to exit the second mode.
 6. Theprocessor of claim 1, the demotion control logic to, subsequent tocausing the first core to operate in the first mode: in response to adetermination that the average count of the first core is below amulti-core un-demotion (MCUD) threshold, cause the first core to exitthe first mode.
 7. The processor of claim 1, the demotion control logicto: in response to the determination that the average count of the firstcore exceeds the first demotion threshold and the sum of the averagecounts exceeds the second demotion threshold, increase an operatingfrequency of the first core.
 8. The processor of claim 1, the demotioncontrol logic to: increment a count of instances of power state breakevents in the first core; and determine the average count in the firstcore as a moving average of the count of instances of power state breakevents in the first core over a defined time window.
 9. A method,comprising: for each core in a plurality of cores of a processor,determining an average count of break events in the core; determining asum of the average counts of the plurality of cores; determining whetherthe average count of a first core exceeds a first threshold; determiningwhether the sum of the average counts of the plurality of cores exceedsa second threshold; and in response to a determination that the averagecount of the first core exceeds the first threshold and the sum of theaverage counts exceeds the second threshold, causing the first core tooperate in a first mode, wherein operating in the first mode comprisesoverruling requests to reduce a power state of the first core.
 10. Themethod of claim 9, further comprising: determining whether the averagecount of a second core exceeds a single-core demotion (SCD) threshold;and in response to a determination that the average count of the secondcore exceeds the SCD threshold, causing the second core to operate in asecond mode, wherein operating in the second mode comprises overrulingrequests to reduce a power state of the second core, wherein the firstthreshold is a core threshold for multi-core demotion (MCD), and whereinthe second demotion threshold is a processor threshold for MCD.
 11. Themethod of claim 10, further comprising, after causing the second core tooperate in the second mode: determining whether the average count of thesecond core is below a single-core un-demotion (SCUD) threshold; and inresponse to a determination that the average count of the second core isbelow the SCUD threshold, causing the second core to exit the secondmode.
 12. The method of claim 9, further comprising: in response to thedetermination that the average count of the first core exceeds the firstthreshold and the sum of the average counts exceeds the secondthreshold: increasing an operating frequency of the first core; andstoring, in a configuration storage of the processor, a demotion typeindicator indicating that the first core was caused to operate in thefirst mode via multi-core demotion.
 13. The method of claim 12, furthercomprising, after causing the first core to operate in the first mode:determining, based on the demotion type indicator, that the first corewas caused to operate in the first mode via multi-core demotion; inresponse to a determination that the first core was caused to operate inthe first mode via multi-core demotion, determining whether the sum ofthe average counts of the plurality of cores is below a processorthreshold for multi-core un-demotion (MCUD); and in response to adetermination that the sum of the average counts of the plurality ofcores is below the processor threshold for MCUD, causing the first coreto exit the first mode.
 14. The method of claim 9, further comprising:for each core in a plurality of cores, periodically obtaining the firstthreshold and the second threshold using a defined time interval. 15.The method of claim 9, wherein determining the average count of breakevents in a core comprises: incrementing a hardware counter to store acount of break events in the core; and determining the average count asa moving average of the count of break events over a defined timewindow.
 16. A system comprising: a processor comprising: a plurality ofcores to execute instructions; and demotion control logic to: determinea plurality of core-level power metrics for the plurality of cores, theplurality of core-level power metrics comprising a first core-levelpower metric for a first core; determine a processor-level power metricequal to a sum of the plurality of core-level power metrics; and inresponse to a determination that the first core-level power metricexceeds a first threshold and the processor-level power metric exceeds asecond threshold, cause the first core to operate in a first mode,wherein operating in the first mode comprises overruling requests toreduce a power state of the first core; and a system memory coupled tothe processor.
 17. The system of claim 16, the demotion control logicto: in response to the determination that the first core-level powermetric exceeds the first threshold and the processor-level power metricexceeds the second threshold, increase an operating frequency of thefirst core.
 18. The system of claim 16, the demotion control logic to:in response to a determination that a second core-level power metricassociated with a second core exceeds a third threshold, cause thesecond core to operate in a second mode, wherein operating in the secondmode comprises overruling requests to reduce a power state of the secondcore.
 19. The system of claim 18, the demotion control logic to: inresponse to the determination that the second core-level power metricexceeds the third threshold, storing, in a configuration storage of theprocessor, a demotion type indicator indicating that the second core wascaused to operate in the second mode via single-core demotion.
 20. Thesystem of claim 16, wherein the first threshold and the second thresholdare associated with the first core, and wherein the first threshold andthe second threshold are periodically updated by an operating system.